pub struct FieldBindings {
pub type_: StructType,
pub fields: Vec<FieldBinding>,
}
Expand description
Represents the binding of a struct or enum variant’s fields to a corresponding set of similarly named local variables.
Fields§
§type_: StructType
§fields: Vec<FieldBinding>
Implementations§
source§impl FieldBindings
impl FieldBindings
pub fn new(fields: &Fields) -> Self
sourcepub fn build_type_constr<R: ToTokens>(
&self,
f: impl Fn(&FieldBinding) -> R,
) -> TokenStream2
pub fn build_type_constr<R: ToTokens>( &self, f: impl Fn(&FieldBinding) -> R, ) -> TokenStream2
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
pub fn build_hlist_constr<R: ToTokens>( &self, f: impl Fn(&FieldBinding) -> R, ) -> TokenStream2
Auto Trait Implementations§
impl Freeze for FieldBindings
impl RefUnwindSafe for FieldBindings
impl !Send for FieldBindings
impl !Sync for FieldBindings
impl Unpin for FieldBindings
impl UnwindSafe for FieldBindings
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