Struct impl_tools_lib::autoimpl::ImplArgs
source · pub struct ImplArgs {
pub path_arguments: PathArguments,
pub ignores: Vec<Member>,
pub using: Option<Member>,
pub clause: Option<WhereClause>,
}
Expand description
Arguments passed to ImplTrait
implementation methods
Fields§
§path_arguments: PathArguments
Path arguments to trait
Example: if the target is Deref<Target = T>
, this is <Target = T>
.
This is always empty unless ImplTrait::support_path_arguments
returns true.
ignores: Vec<Member>
Fields ignored in attribute
using: Option<Member>
Field specified to ‘use’ in attribute
clause: Option<WhereClause>
Where clause added to attribute
Implementations§
source§impl ImplArgs
impl ImplArgs
sourcepub fn ignore_named(&self, ident: &Ident) -> bool
pub fn ignore_named(&self, ident: &Ident) -> bool
If true, this named field is ignored
sourcepub fn ignore_unnamed(&self, index: &Index) -> bool
pub fn ignore_unnamed(&self, index: &Index) -> bool
If true, this unnamed field is ignored
sourcepub fn using_member(&self) -> Option<&Member>
pub fn using_member(&self) -> Option<&Member>
Field to “use”, if any
sourcepub fn using_field<'b>(&self, fields: &'b Fields) -> Option<&'b Field>
pub fn using_field<'b>(&self, fields: &'b Fields) -> Option<&'b Field>
Find field to “use”, if any