[][src]Struct frunk_proc_macro_helpers::FieldBindings

pub struct FieldBindings {
    pub type_: StructType,
    pub fields: Vec<FieldBinding>,
}

Represents the binding of a struct or enum variant's fields to a corresponding set of similarly named local variables.

Fields

type_: StructTypefields: Vec<FieldBinding>

Methods

impl FieldBindings[src]

pub fn new(fields: &Fields) -> Self[src]

pub fn build_type_constr<R: ToTokens>(
    &self,
    f: impl Fn(&FieldBinding) -> R
) -> TokenStream2
[src]

Builds a type constructor for use with structs or enum variants. Does not include the name of the type or variant.

pub fn build_hlist_type<R: ToTokens>(
    &self,
    f: impl Fn(&FieldBinding) -> R
) -> TokenStream2
[src]

pub fn build_hlist_constr<R: ToTokens>(
    &self,
    f: impl Fn(&FieldBinding) -> R
) -> TokenStream2
[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Choices> CoproductSubsetter<CNil, HNil> for Choices[src]

type Remainder = Choices

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U, I> LiftInto<U, I> for T where
    U: LiftFrom<T, I>, 
[src]

impl<Source> Sculptor<HNil, HNil> for Source[src]

type Remainder = Source

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.