Return an iterator over the arguments of this block.
(
&self,
pool: &'a ValueListPool,
)
| 106 | |
| 107 | /// Return an iterator over the arguments of this block. |
| 108 | pub fn args<'a>( |
| 109 | &self, |
| 110 | pool: &'a ValueListPool, |
| 111 | ) -> impl ExactSizeIterator<Item = BlockArg> + DoubleEndedIterator<Item = BlockArg> + use<'a> |
| 112 | { |
| 113 | self.values.as_slice(pool)[1..] |
| 114 | .iter() |
| 115 | .map(|value| BlockArg::decode_from_value(*value)) |
| 116 | } |
| 117 | |
| 118 | /// Traverse the arguments with a closure that can mutate them. |
| 119 | pub fn update_args<F: FnMut(BlockArg) -> BlockArg>( |
no test coverage detected