Struct derive_more::utils::State
source · pub struct State<'input> {Show 16 fields
pub input: &'input DeriveInput,
pub trait_name: &'static str,
pub trait_ident: Ident,
pub method_ident: Ident,
pub trait_module: TokenStream,
pub trait_path: TokenStream,
pub trait_path_params: Vec<TokenStream>,
pub trait_attr: String,
pub derive_type: DeriveType,
pub fields: Vec<&'input Field>,
pub variants: Vec<&'input Variant>,
pub variant_states: Vec<State<'input>>,
pub variant: Option<&'input Variant>,
pub generics: Generics,
pub default_info: FullMetaInfo,
full_meta_infos: Vec<FullMetaInfo>,
}
Fields§
§input: &'input DeriveInput
§trait_name: &'static str
§trait_ident: Ident
§method_ident: Ident
§trait_module: TokenStream
§trait_path: TokenStream
§trait_path_params: Vec<TokenStream>
§trait_attr: String
§derive_type: DeriveType
§fields: Vec<&'input Field>
§variants: Vec<&'input Variant>
§variant_states: Vec<State<'input>>
§variant: Option<&'input Variant>
§generics: Generics
§default_info: FullMetaInfo
§full_meta_infos: Vec<FullMetaInfo>
Implementations§
source§impl<'input> State<'input>
impl<'input> State<'input>
pub fn new<'arg_input>( input: &'arg_input DeriveInput, trait_name: &'static str, trait_module: TokenStream, trait_attr: String ) -> Result<State<'arg_input>>
pub fn with_field_ignore<'arg_input>( input: &'arg_input DeriveInput, trait_name: &'static str, trait_module: TokenStream, trait_attr: String ) -> Result<State<'arg_input>>
pub fn with_field_ignore_and_forward<'arg_input>( input: &'arg_input DeriveInput, trait_name: &'static str, trait_module: TokenStream, trait_attr: String ) -> Result<State<'arg_input>>
pub fn with_field_ignore_and_refs<'arg_input>( input: &'arg_input DeriveInput, trait_name: &'static str, trait_module: TokenStream, trait_attr: String ) -> Result<State<'arg_input>>
pub fn with_attr_params<'arg_input>( input: &'arg_input DeriveInput, trait_name: &'static str, trait_module: TokenStream, trait_attr: String, allowed_attr_params: AttrParams ) -> Result<State<'arg_input>>
pub fn with_type_bound<'arg_input>( input: &'arg_input DeriveInput, trait_name: &'static str, trait_module: TokenStream, trait_attr: String, allowed_attr_params: AttrParams, add_type_bound: bool ) -> Result<State<'arg_input>>
fn new_impl<'arg_input>( input: &'arg_input DeriveInput, trait_name: &'static str, trait_module: TokenStream, trait_attr: String, allowed_attr_params: AttrParams, add_type_bound: bool ) -> Result<State<'arg_input>>
pub fn from_variant<'arg_input>( input: &'arg_input DeriveInput, trait_name: &'static str, trait_module: TokenStream, trait_attr: String, allowed_attr_params: AttrParams, variant: &'arg_input Variant, default_info: FullMetaInfo ) -> Result<State<'arg_input>>
pub fn add_trait_path_type_param(&mut self, param: TokenStream)
pub fn assert_single_enabled_field<'state>( &'state self ) -> SingleFieldData<'input, 'state>
pub fn enabled_fields_data<'state>( &'state self ) -> MultiFieldData<'input, 'state>
pub fn enabled_variant_data<'state>( &'state self ) -> MultiVariantData<'input, 'state>
fn enabled_variants(&self) -> Vec<&'input Variant>
fn enabled_variant_states(&self) -> Vec<&State<'input>>
pub fn enabled_fields(&self) -> Vec<&'input Field>
fn field_idents(&self) -> Vec<TokenStream>
fn enabled_fields_idents(&self) -> Vec<TokenStream>
fn enabled_fields_indexes(&self) -> Vec<usize>
fn enabled_infos(&self) -> Vec<FullMetaInfo>
Auto Trait Implementations§
impl<'input> RefUnwindSafe for State<'input>
impl<'input> !Send for State<'input>
impl<'input> !Sync for State<'input>
impl<'input> Unpin for State<'input>
impl<'input> UnwindSafe for State<'input>
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