Construct a BlockCall with the given block and arguments.
(
block: Block,
args: impl IntoIterator<Item = BlockArg>,
pool: &mut ValueListPool,
)
| 73 | |
| 74 | /// Construct a BlockCall with the given block and arguments. |
| 75 | pub fn new( |
| 76 | block: Block, |
| 77 | args: impl IntoIterator<Item = BlockArg>, |
| 78 | pool: &mut ValueListPool, |
| 79 | ) -> Self { |
| 80 | let mut values = ValueList::default(); |
| 81 | values.push(Self::block_to_value(block), pool); |
| 82 | values.extend(args.into_iter().map(|arg| arg.encode_as_value()), pool); |
| 83 | Self { values } |
| 84 | } |
| 85 | |
| 86 | /// Return the block for this BlockCall. |
| 87 | pub fn block(&self, pool: &ValueListPool) -> Block { |