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<Self>
fn from_derive_input(_: &DeriveInput) -> Result<Self>
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<Self>
source§impl FromGenerics for Ignored
impl FromGenerics for Ignored
fn from_generics(_: &Generics) -> Result<Self>
source§impl FromMeta for Ignored
impl FromMeta for Ignored
source§fn from_meta(_: &Meta) -> Result<Self>
fn from_meta(_: &Meta) -> Result<Self>
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>
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>
fn from_word() -> Result<Self>
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>
fn from_list(items: &[NestedMeta]) -> Result<Self>
Create an instance from a list of nested meta items.
source§fn from_value(value: &Lit) -> Result<Self>
fn from_value(value: &Lit) -> Result<Self>
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>
source§fn from_char(value: char) -> Result<Self>
fn from_char(value: char) -> Result<Self>
Create an instance from a char literal in a value position.
source§fn from_string(value: &str) -> Result<Self>
fn from_string(value: &str) -> Result<Self>
Create an instance from a string literal in a value position.
source§impl FromTypeParam for Ignored
impl FromTypeParam for Ignored
fn from_type_param(_: &TypeParam) -> Result<Self>
source§impl FromVariant for Ignored
impl FromVariant for Ignored
source§fn from_variant(_: &Variant) -> Result<Self>
fn from_variant(_: &Variant) -> Result<Self>
Create an instance from
syn::Variant
, or return an error.source§impl UsesLifetimes for Ignored
impl UsesLifetimes for Ignored
source§fn uses_lifetimes<'a>(
&self,
_opts: &Options,
_: &'a LifetimeSet,
) -> LifetimeRefSet<'a>
fn uses_lifetimes<'a>( &self, _opts: &Options, _: &'a LifetimeSet, ) -> LifetimeRefSet<'a>
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: &LifetimeSet,
) -> LifetimeSet
fn uses_lifetimes_cloned( &self, options: &Options, lifetimes: &LifetimeSet, ) -> LifetimeSet
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 IdentSet,
) -> IdentRefSet<'a>
fn uses_type_params<'a>( &self, _opts: &Options, _: &'a IdentSet, ) -> IdentRefSet<'a>
Returns the subset of the queried type parameters that are used by the implementing syntax element. Read more
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
)