pub struct Handover<'a> { /* private fields */ }Expand description
The values being taken out of a graph, handed to the value which is made of them so that it can hand them over.
Handing a value over takes it out of where it was and leaves it waiting to be taken apart in its own right, which is what keeps the walk from descending - and therefore from costing a native frame for every level a graph nests.
Implementations§
Source§impl Handover<'_>
impl Handover<'_>
Sourcepub fn consume<T>(&mut self, from: &mut T)
pub fn consume<T>(&mut self, from: &mut T)
Hand over everything from is made of.
This is what a type calls for each of the values it holds, whether that
is a Value or something which is itself made of values.
Sourcepub fn consume_all<'a, T>(
&mut self,
values: impl IntoIterator<Item = &'a mut T>,
)
pub fn consume_all<'a, T>( &mut self, values: impl IntoIterator<Item = &'a mut T>, )
Hand over everything in values.
Sourcepub fn consume_ref(&mut self, guard: &mut RawAnyGuard)
pub fn consume_ref(&mut self, guard: &mut RawAnyGuard)
Hand over the value which guard keeps alive, if it still keeps one
alive.
An iterator over a collection holds the collection through a guard rather than in a slot it could hand over, so this is how it hands the collection over.