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
sourceimpl FromDeriveInput for Ignored
impl FromDeriveInput for Ignored
sourcefn 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.
sourceimpl FromGenericParam for Ignored
impl FromGenericParam for Ignored
fn from_generic_param(&GenericParam) -> Result<Ignored, Error>
sourceimpl FromGenerics for Ignored
impl FromGenerics for Ignored
sourceimpl FromMeta for Ignored
impl FromMeta for Ignored
sourcefn 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 more
fn from_nested_meta(item: &NestedMeta) -> Result<Self, Error>
sourcefn 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. Read more
sourcefn 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.
sourcefn 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 more
sourcefn 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.
sourcefn from_string(value: &str) -> Result<Self, Error>
fn from_string(value: &str) -> Result<Self, Error>
Create an instance from a string literal in a value position.
sourceimpl FromTypeParam for Ignored
impl FromTypeParam for Ignored
sourceimpl FromVariant for Ignored
impl FromVariant for Ignored
sourceimpl UsesLifetimes for Ignored
impl UsesLifetimes for Ignored
sourcefn uses_lifetimes(
&self,
_opts: &Options,
&'a HashSet<Lifetime, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'a Lifetime, BuildHasherDefault<FnvHasher>>
fn uses_lifetimes(
&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
sourcefn 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.
sourceimpl UsesTypeParams for Ignored
impl UsesTypeParams for Ignored
sourcefn uses_type_params(
&self,
_opts: &Options,
&'a HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'a Ident, BuildHasherDefault<FnvHasher>>
fn uses_type_params(
&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
sourcefn 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 StructuralEq for Ignored
impl StructuralPartialEq for Ignored
Auto Trait Implementations
impl RefUnwindSafe for Ignored
impl Send for Ignored
impl Sync for Ignored
impl Unpin for Ignored
impl UnwindSafe for Ignored
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more