pub struct FoldVariant {
pub ctor: Option<Ident>,
pub fallible: bool,
pub clone: bool,
pub inputs: Vec<FoldArg>,
}Expand description
One dispatch arm of a FoldPlan.
Fields§
§ctor: Option<Ident>None => identity (pass the decoded target value through). Some =>
call this constructor function.
fallible: boolWhether the constructor returns Result (its Err is routed through
the adapter’s error channel). Always false for identity.
clone: booltrue for a borrowed identity arm (&T parameter): the input leaf is
Option<&T> and the fold clones it (T: Clone) so the caller’s handle
is preserved rather than consumed. false otherwise.
inputs: Vec<FoldArg>This variant’s constructor inputs, in parameter order. Each is either a flat wire leaf or a recursively-built sub-value (a parameter that is itself a type with a default constructor — recursive input).
Trait Implementations§
Source§impl Clone for FoldVariant
impl Clone for FoldVariant
Source§fn clone(&self) -> FoldVariant
fn clone(&self) -> FoldVariant
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !Send for FoldVariant
impl !Sync for FoldVariant
impl Freeze for FoldVariant
impl RefUnwindSafe for FoldVariant
impl Unpin for FoldVariant
impl UnsafeUnpin for FoldVariant
impl UnwindSafe for FoldVariant
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more