pub enum NamedOrUnnamedFieldMut<'a> {
Named(&'a mut NamedField),
Unnamed(&'a mut UnnamedField),
}
Expand description
Either NamedField or UnnamedField
Variants§
Named(&'a mut NamedField)
Unnamed(&'a mut UnnamedField)
Trait Implementations§
source§impl Field for NamedOrUnnamedFieldMut<'_>
impl Field for NamedOrUnnamedFieldMut<'_>
fn get_type_that_needs_constraint(&self) -> Option<Type>
fn get_pattern_with_config(
&self,
type_of_self: TypeOfSelf,
name_postfix: &'static str
) -> TokenStream
fn get_type(&self) -> &Type
source§fn get_pattern(&self, type_of_self: TypeOfSelf) -> TokenStream
fn get_pattern(&self, type_of_self: TypeOfSelf) -> TokenStream
Get a pattern for reading this field
source§impl FieldMut for NamedOrUnnamedFieldMut<'_>
impl FieldMut for NamedOrUnnamedFieldMut<'_>
fn get_reference_with_config(
&mut self,
used_for_trait: bool,
name_postfix: &'static str
) -> Expr
source§fn get_reference(&mut self) -> Expr
fn get_reference(&mut self) -> Expr
Get a expression which refers to this field. Note that reference takes the form
_
+ index of field, this is
to prevent possible clashes with parameter names.
Use [Field::get_reference_with_config] to for different options