pub struct Ignored;
Expand description
An efficient way of discarding data from a syntax element.
All syntax elements will be successfully read into
the Ignored
struct, with all properties discarded.
Trait Implementations§
source§impl FromDeriveInput for Ignored
impl FromDeriveInput for Ignored
source§fn from_derive_input(_: &DeriveInput) -> Result<Ignored, Error>
fn from_derive_input(_: &DeriveInput) -> Result<Ignored, Error>
Create an instance from
syn::DeriveInput
, or return an error.source§impl FromGenericParam for Ignored
impl FromGenericParam for Ignored
fn from_generic_param(_: &GenericParam) -> Result<Ignored, Error>
source§impl FromMeta for Ignored
impl FromMeta for Ignored
source§fn from_meta(_: &Meta) -> Result<Ignored, Error>
fn from_meta(_: &Meta) -> Result<Ignored, Error>
Create an instance from a
syn::Meta
by dispatching to the format-appropriate
trait function. This generally should not be overridden by implementers. Read morefn from_nested_meta(item: &NestedMeta) -> Result<Self, Error>
source§fn from_none() -> Option<Self>
fn from_none() -> Option<Self>
When a field is omitted from a parent meta-item,
from_none
is used to attempt
recovery before a missing field error is generated. Read moresource§fn from_word() -> Result<Self, Error>
fn from_word() -> Result<Self, Error>
Create an instance from the presence of the word in the attribute with no
additional options specified.
source§fn from_list(items: &[NestedMeta]) -> Result<Self, Error>
fn from_list(items: &[NestedMeta]) -> Result<Self, Error>
Create an instance from a list of nested meta items.
source§fn from_value(value: &Lit) -> Result<Self, Error>
fn from_value(value: &Lit) -> Result<Self, Error>
Create an instance from a literal value of either
foo = "bar"
or foo("bar")
.
This dispatches to the appropriate method based on the type of literal encountered,
and generally should not be overridden by implementers. Read morefn from_expr(expr: &Expr) -> Result<Self, Error>
source§fn from_char(value: char) -> Result<Self, Error>
fn from_char(value: char) -> Result<Self, Error>
Create an instance from a char literal in a value position.
source§impl FromTypeParam for Ignored
impl FromTypeParam for Ignored
source§impl FromVariant for Ignored
impl FromVariant for Ignored
source§impl UsesLifetimes for Ignored
impl UsesLifetimes for Ignored
source§fn uses_lifetimes<'a>(
&self,
_opts: &Options,
_: &'a HashSet<Lifetime, BuildHasherDefault<FnvHasher>>,
) -> HashSet<&'a Lifetime, BuildHasherDefault<FnvHasher>>
fn uses_lifetimes<'a>( &self, _opts: &Options, _: &'a HashSet<Lifetime, BuildHasherDefault<FnvHasher>>, ) -> HashSet<&'a Lifetime, BuildHasherDefault<FnvHasher>>
Returns the subset of the queried lifetimes that are used by the implementing syntax element. Read more
source§fn uses_lifetimes_cloned(
&self,
options: &Options,
lifetimes: &HashSet<Lifetime, BuildHasherDefault<FnvHasher>>,
) -> HashSet<Lifetime, BuildHasherDefault<FnvHasher>>
fn uses_lifetimes_cloned( &self, options: &Options, lifetimes: &HashSet<Lifetime, BuildHasherDefault<FnvHasher>>, ) -> HashSet<Lifetime, BuildHasherDefault<FnvHasher>>
Find all used lifetimes, then clone them and return that set.
source§impl UsesTypeParams for Ignored
impl UsesTypeParams for Ignored
source§fn uses_type_params<'a>(
&self,
_opts: &Options,
_: &'a HashSet<Ident, BuildHasherDefault<FnvHasher>>,
) -> HashSet<&'a Ident, BuildHasherDefault<FnvHasher>>
fn uses_type_params<'a>( &self, _opts: &Options, _: &'a HashSet<Ident, BuildHasherDefault<FnvHasher>>, ) -> HashSet<&'a Ident, BuildHasherDefault<FnvHasher>>
Returns the subset of the queried type parameters that are used by the implementing syntax element. Read more
source§fn uses_type_params_cloned(
&self,
options: &Options,
type_set: &HashSet<Ident, BuildHasherDefault<FnvHasher>>,
) -> HashSet<Ident, BuildHasherDefault<FnvHasher>>
fn uses_type_params_cloned( &self, options: &Options, type_set: &HashSet<Ident, BuildHasherDefault<FnvHasher>>, ) -> HashSet<Ident, BuildHasherDefault<FnvHasher>>
Find all type params using
uses_type_params
, then clone the found values and return the set.impl Copy for Ignored
impl Eq for Ignored
impl StructuralPartialEq for Ignored
Auto Trait Implementations§
impl Freeze for Ignored
impl RefUnwindSafe for Ignored
impl Send for Ignored
impl Sync for Ignored
impl Unpin for Ignored
impl UnwindSafe for Ignored
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)