Skip to main content

Handover

Struct Handover 

Source
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<'_>

Source

pub fn consume<T>(&mut self, from: &mut T)
where T: ?Sized + Dismantle,

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.

Source

pub fn consume_all<'a, T>( &mut self, values: impl IntoIterator<Item = &'a mut T>, )
where T: 'a + ?Sized + Dismantle,

Hand over everything in values.

Source

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.

Source

pub fn push(&mut self, value: Value)

Hand value over as it is.

Auto Trait Implementations§

§

impl<'a> !RefUnwindSafe for Handover<'a>

§

impl<'a> !Send for Handover<'a>

§

impl<'a> !Sync for Handover<'a>

§

impl<'a> !UnwindSafe for Handover<'a>

§

impl<'a> Freeze for Handover<'a>

§

impl<'a> Unpin for Handover<'a>

§

impl<'a> UnsafeUnpin for Handover<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more