Trait darling_core::usage::UsesLifetimes [−][src]
pub trait UsesLifetimes { fn uses_lifetimes<'a>(
&self,
options: &Options,
lifetimes: &'a LifetimeSet
) -> LifetimeRefSet<'a>; fn uses_lifetimes_cloned(
&self,
options: &Options,
lifetimes: &LifetimeSet
) -> LifetimeSet { ... } }
Searcher for finding lifetimes in a syntax tree. This can be used to determine which lifetimes must be emitted in generated code.
Required methods
fn uses_lifetimes<'a>(
&self,
options: &Options,
lifetimes: &'a LifetimeSet
) -> LifetimeRefSet<'a>
[src]
&self,
options: &Options,
lifetimes: &'a LifetimeSet
) -> LifetimeRefSet<'a>
Returns the subset of the queried lifetimes that are used by the implementing syntax element.
This method only accounts for direct usage by the element; indirect usage via bounds or where
predicates are not detected.
Provided methods
fn uses_lifetimes_cloned(
&self,
options: &Options,
lifetimes: &LifetimeSet
) -> LifetimeSet
[src]
&self,
options: &Options,
lifetimes: &LifetimeSet
) -> LifetimeSet
Find all used lifetimes, then clone them and return that set.
Implementations on Foreign Types
impl<T: UsesLifetimes> UsesLifetimes for Vec<T>
[src]
impl<T: UsesLifetimes> UsesLifetimes for Vec<T>
[src]fn uses_lifetimes<'a>(
&self,
options: &Options,
lifetimes: &'a LifetimeSet
) -> LifetimeRefSet<'a>
[src]
&self,
options: &Options,
lifetimes: &'a LifetimeSet
) -> LifetimeRefSet<'a>
impl<T: UsesLifetimes, U> UsesLifetimes for Punctuated<T, U>
[src]
impl<T: UsesLifetimes, U> UsesLifetimes for Punctuated<T, U>
[src]fn uses_lifetimes<'a>(
&self,
options: &Options,
lifetimes: &'a LifetimeSet
) -> LifetimeRefSet<'a>
[src]
&self,
options: &Options,
lifetimes: &'a LifetimeSet
) -> LifetimeRefSet<'a>
impl<T: UsesLifetimes> UsesLifetimes for Option<T>
[src]
impl<T: UsesLifetimes> UsesLifetimes for Option<T>
[src]fn uses_lifetimes<'a>(
&self,
options: &Options,
lifetimes: &'a LifetimeSet
) -> LifetimeRefSet<'a>
[src]
&self,
options: &Options,
lifetimes: &'a LifetimeSet
) -> LifetimeRefSet<'a>
impl UsesLifetimes for Lifetime
[src]
impl UsesLifetimes for Lifetime
[src]fn uses_lifetimes<'a>(
&self,
_: &Options,
lifetimes: &'a LifetimeSet
) -> LifetimeRefSet<'a>
[src]
&self,
_: &Options,
lifetimes: &'a LifetimeSet
) -> LifetimeRefSet<'a>
impl UsesLifetimes for AngleBracketedGenericArguments
[src]
impl UsesLifetimes for AngleBracketedGenericArguments
[src]fn uses_lifetimes<'gen>(
&self,
options: &Options,
type_set: &'gen LifetimeSet
) -> LifetimeRefSet<'gen>
[src]
&self,
options: &Options,
type_set: &'gen LifetimeSet
) -> LifetimeRefSet<'gen>
impl UsesLifetimes for BareFnArg
[src]
impl UsesLifetimes for BareFnArg
[src]fn uses_lifetimes<'gen>(
&self,
options: &Options,
type_set: &'gen LifetimeSet
) -> LifetimeRefSet<'gen>
[src]
&self,
options: &Options,
type_set: &'gen LifetimeSet
) -> LifetimeRefSet<'gen>
impl UsesLifetimes for Binding
[src]
impl UsesLifetimes for Binding
[src]fn uses_lifetimes<'gen>(
&self,
options: &Options,
type_set: &'gen LifetimeSet
) -> LifetimeRefSet<'gen>
[src]
&self,
options: &Options,
type_set: &'gen LifetimeSet
) -> LifetimeRefSet<'gen>
impl UsesLifetimes for BoundLifetimes
[src]
impl UsesLifetimes for BoundLifetimes
[src]fn uses_lifetimes<'gen>(
&self,
options: &Options,
type_set: &'gen LifetimeSet
) -> LifetimeRefSet<'gen>
[src]
&self,
options: &Options,
type_set: &'gen LifetimeSet
) -> LifetimeRefSet<'gen>
impl UsesLifetimes for Constraint
[src]
impl UsesLifetimes for Constraint
[src]fn uses_lifetimes<'gen>(
&self,
options: &Options,
type_set: &'gen LifetimeSet
) -> LifetimeRefSet<'gen>
[src]
&self,
options: &Options,
type_set: &'gen LifetimeSet
) -> LifetimeRefSet<'gen>
impl UsesLifetimes for DataEnum
[src]
impl UsesLifetimes for DataEnum
[src]fn uses_lifetimes<'gen>(
&self,
options: &Options,
type_set: &'gen LifetimeSet
) -> LifetimeRefSet<'gen>
[src]
&self,
options: &Options,
type_set: &'gen LifetimeSet
) -> LifetimeRefSet<'gen>
impl UsesLifetimes for DataStruct
[src]
impl UsesLifetimes for DataStruct
[src]fn uses_lifetimes<'gen>(
&self,
options: &Options,
type_set: &'gen LifetimeSet
) -> LifetimeRefSet<'gen>
[src]
&self,
options: &Options,
type_set: &'gen LifetimeSet
) -> LifetimeRefSet<'gen>
impl UsesLifetimes for DataUnion
[src]
impl UsesLifetimes for DataUnion
[src]fn uses_lifetimes<'gen>(
&self,
options: &Options,
type_set: &'gen LifetimeSet
) -> LifetimeRefSet<'gen>
[src]
&self,
options: &Options,
type_set: &'gen LifetimeSet
) -> LifetimeRefSet<'gen>
impl UsesLifetimes for Field
[src]
impl UsesLifetimes for Field
[src]fn uses_lifetimes<'gen>(
&self,
options: &Options,
type_set: &'gen LifetimeSet
) -> LifetimeRefSet<'gen>
[src]
&self,
options: &Options,
type_set: &'gen LifetimeSet
) -> LifetimeRefSet<'gen>
impl UsesLifetimes for FieldsNamed
[src]
impl UsesLifetimes for FieldsNamed
[src]fn uses_lifetimes<'gen>(
&self,
options: &Options,
type_set: &'gen LifetimeSet
) -> LifetimeRefSet<'gen>
[src]
&self,
options: &Options,
type_set: &'gen LifetimeSet
) -> LifetimeRefSet<'gen>
impl UsesLifetimes for LifetimeDef
[src]
impl UsesLifetimes for LifetimeDef
[src]fn uses_lifetimes<'gen>(
&self,
options: &Options,
type_set: &'gen LifetimeSet
) -> LifetimeRefSet<'gen>
[src]
&self,
options: &Options,
type_set: &'gen LifetimeSet
) -> LifetimeRefSet<'gen>
impl UsesLifetimes for ParenthesizedGenericArguments
[src]
impl UsesLifetimes for ParenthesizedGenericArguments
[src]fn uses_lifetimes<'gen>(
&self,
options: &Options,
type_set: &'gen LifetimeSet
) -> LifetimeRefSet<'gen>
[src]
&self,
options: &Options,
type_set: &'gen LifetimeSet
) -> LifetimeRefSet<'gen>
impl UsesLifetimes for Path
[src]
impl UsesLifetimes for Path
[src]fn uses_lifetimes<'gen>(
&self,
options: &Options,
type_set: &'gen LifetimeSet
) -> LifetimeRefSet<'gen>
[src]
&self,
options: &Options,
type_set: &'gen LifetimeSet
) -> LifetimeRefSet<'gen>
impl UsesLifetimes for PathSegment
[src]
impl UsesLifetimes for PathSegment
[src]fn uses_lifetimes<'gen>(
&self,
options: &Options,
type_set: &'gen LifetimeSet
) -> LifetimeRefSet<'gen>
[src]
&self,
options: &Options,
type_set: &'gen LifetimeSet
) -> LifetimeRefSet<'gen>
impl UsesLifetimes for PredicateEq
[src]
impl UsesLifetimes for PredicateEq
[src]fn uses_lifetimes<'gen>(
&self,
options: &Options,
type_set: &'gen LifetimeSet
) -> LifetimeRefSet<'gen>
[src]
&self,
options: &Options,
type_set: &'gen LifetimeSet
) -> LifetimeRefSet<'gen>
impl UsesLifetimes for PredicateLifetime
[src]
impl UsesLifetimes for PredicateLifetime
[src]fn uses_lifetimes<'gen>(
&self,
options: &Options,
type_set: &'gen LifetimeSet
) -> LifetimeRefSet<'gen>
[src]
&self,
options: &Options,
type_set: &'gen LifetimeSet
) -> LifetimeRefSet<'gen>
impl UsesLifetimes for PredicateType
[src]
impl UsesLifetimes for PredicateType
[src]fn uses_lifetimes<'gen>(
&self,
options: &Options,
type_set: &'gen LifetimeSet
) -> LifetimeRefSet<'gen>
[src]
&self,
options: &Options,
type_set: &'gen LifetimeSet
) -> LifetimeRefSet<'gen>
impl UsesLifetimes for QSelf
[src]
impl UsesLifetimes for QSelf
[src]fn uses_lifetimes<'gen>(
&self,
options: &Options,
type_set: &'gen LifetimeSet
) -> LifetimeRefSet<'gen>
[src]
&self,
options: &Options,
type_set: &'gen LifetimeSet
) -> LifetimeRefSet<'gen>
impl UsesLifetimes for TraitBound
[src]
impl UsesLifetimes for TraitBound
[src]fn uses_lifetimes<'gen>(
&self,
options: &Options,
type_set: &'gen LifetimeSet
) -> LifetimeRefSet<'gen>
[src]
&self,
options: &Options,
type_set: &'gen LifetimeSet
) -> LifetimeRefSet<'gen>
impl UsesLifetimes for TypeArray
[src]
impl UsesLifetimes for TypeArray
[src]fn uses_lifetimes<'gen>(
&self,
options: &Options,
type_set: &'gen LifetimeSet
) -> LifetimeRefSet<'gen>
[src]
&self,
options: &Options,
type_set: &'gen LifetimeSet
) -> LifetimeRefSet<'gen>
impl UsesLifetimes for TypeBareFn
[src]
impl UsesLifetimes for TypeBareFn
[src]fn uses_lifetimes<'gen>(
&self,
options: &Options,
type_set: &'gen LifetimeSet
) -> LifetimeRefSet<'gen>
[src]
&self,
options: &Options,
type_set: &'gen LifetimeSet
) -> LifetimeRefSet<'gen>
impl UsesLifetimes for TypeGroup
[src]
impl UsesLifetimes for TypeGroup
[src]fn uses_lifetimes<'gen>(
&self,
options: &Options,
type_set: &'gen LifetimeSet
) -> LifetimeRefSet<'gen>
[src]
&self,
options: &Options,
type_set: &'gen LifetimeSet
) -> LifetimeRefSet<'gen>
impl UsesLifetimes for TypeImplTrait
[src]
impl UsesLifetimes for TypeImplTrait
[src]fn uses_lifetimes<'gen>(
&self,
options: &Options,
type_set: &'gen LifetimeSet
) -> LifetimeRefSet<'gen>
[src]
&self,
options: &Options,
type_set: &'gen LifetimeSet
) -> LifetimeRefSet<'gen>
impl UsesLifetimes for TypeParen
[src]
impl UsesLifetimes for TypeParen
[src]fn uses_lifetimes<'gen>(
&self,
options: &Options,
type_set: &'gen LifetimeSet
) -> LifetimeRefSet<'gen>
[src]
&self,
options: &Options,
type_set: &'gen LifetimeSet
) -> LifetimeRefSet<'gen>
impl UsesLifetimes for TypePtr
[src]
impl UsesLifetimes for TypePtr
[src]fn uses_lifetimes<'gen>(
&self,
options: &Options,
type_set: &'gen LifetimeSet
) -> LifetimeRefSet<'gen>
[src]
&self,
options: &Options,
type_set: &'gen LifetimeSet
) -> LifetimeRefSet<'gen>
impl UsesLifetimes for TypeReference
[src]
impl UsesLifetimes for TypeReference
[src]fn uses_lifetimes<'gen>(
&self,
options: &Options,
type_set: &'gen LifetimeSet
) -> LifetimeRefSet<'gen>
[src]
&self,
options: &Options,
type_set: &'gen LifetimeSet
) -> LifetimeRefSet<'gen>
impl UsesLifetimes for TypeSlice
[src]
impl UsesLifetimes for TypeSlice
[src]fn uses_lifetimes<'gen>(
&self,
options: &Options,
type_set: &'gen LifetimeSet
) -> LifetimeRefSet<'gen>
[src]
&self,
options: &Options,
type_set: &'gen LifetimeSet
) -> LifetimeRefSet<'gen>
impl UsesLifetimes for TypeTuple
[src]
impl UsesLifetimes for TypeTuple
[src]fn uses_lifetimes<'gen>(
&self,
options: &Options,
type_set: &'gen LifetimeSet
) -> LifetimeRefSet<'gen>
[src]
&self,
options: &Options,
type_set: &'gen LifetimeSet
) -> LifetimeRefSet<'gen>
impl UsesLifetimes for TypeTraitObject
[src]
impl UsesLifetimes for TypeTraitObject
[src]fn uses_lifetimes<'gen>(
&self,
options: &Options,
type_set: &'gen LifetimeSet
) -> LifetimeRefSet<'gen>
[src]
&self,
options: &Options,
type_set: &'gen LifetimeSet
) -> LifetimeRefSet<'gen>
impl UsesLifetimes for Variant
[src]
impl UsesLifetimes for Variant
[src]fn uses_lifetimes<'gen>(
&self,
options: &Options,
type_set: &'gen LifetimeSet
) -> LifetimeRefSet<'gen>
[src]
&self,
options: &Options,
type_set: &'gen LifetimeSet
) -> LifetimeRefSet<'gen>
impl UsesLifetimes for Data
[src]
impl UsesLifetimes for Data
[src]fn uses_lifetimes<'a>(
&self,
options: &Options,
lifetimes: &'a LifetimeSet
) -> LifetimeRefSet<'a>
[src]
&self,
options: &Options,
lifetimes: &'a LifetimeSet
) -> LifetimeRefSet<'a>
impl UsesLifetimes for Type
[src]
impl UsesLifetimes for Type
[src]fn uses_lifetimes<'a>(
&self,
options: &Options,
lifetimes: &'a LifetimeSet
) -> LifetimeRefSet<'a>
[src]
&self,
options: &Options,
lifetimes: &'a LifetimeSet
) -> LifetimeRefSet<'a>
impl UsesLifetimes for Fields
[src]
impl UsesLifetimes for Fields
[src]fn uses_lifetimes<'a>(
&self,
options: &Options,
lifetimes: &'a LifetimeSet
) -> LifetimeRefSet<'a>
[src]
&self,
options: &Options,
lifetimes: &'a LifetimeSet
) -> LifetimeRefSet<'a>
impl UsesLifetimes for TypePath
[src]
impl UsesLifetimes for TypePath
[src]fn uses_lifetimes<'a>(
&self,
options: &Options,
lifetimes: &'a LifetimeSet
) -> LifetimeRefSet<'a>
[src]
&self,
options: &Options,
lifetimes: &'a LifetimeSet
) -> LifetimeRefSet<'a>
impl UsesLifetimes for ReturnType
[src]
impl UsesLifetimes for ReturnType
[src]fn uses_lifetimes<'a>(
&self,
options: &Options,
lifetimes: &'a LifetimeSet
) -> LifetimeRefSet<'a>
[src]
&self,
options: &Options,
lifetimes: &'a LifetimeSet
) -> LifetimeRefSet<'a>
impl UsesLifetimes for PathArguments
[src]
impl UsesLifetimes for PathArguments
[src]fn uses_lifetimes<'a>(
&self,
options: &Options,
lifetimes: &'a LifetimeSet
) -> LifetimeRefSet<'a>
[src]
&self,
options: &Options,
lifetimes: &'a LifetimeSet
) -> LifetimeRefSet<'a>
impl UsesLifetimes for WherePredicate
[src]
impl UsesLifetimes for WherePredicate
[src]fn uses_lifetimes<'a>(
&self,
options: &Options,
lifetimes: &'a LifetimeSet
) -> LifetimeRefSet<'a>
[src]
&self,
options: &Options,
lifetimes: &'a LifetimeSet
) -> LifetimeRefSet<'a>
impl UsesLifetimes for GenericArgument
[src]
impl UsesLifetimes for GenericArgument
[src]fn uses_lifetimes<'a>(
&self,
options: &Options,
lifetimes: &'a LifetimeSet
) -> LifetimeRefSet<'a>
[src]
&self,
options: &Options,
lifetimes: &'a LifetimeSet
) -> LifetimeRefSet<'a>
impl UsesLifetimes for TypeParamBound
[src]
impl UsesLifetimes for TypeParamBound
[src]fn uses_lifetimes<'a>(
&self,
options: &Options,
lifetimes: &'a LifetimeSet
) -> LifetimeRefSet<'a>
[src]
&self,
options: &Options,
lifetimes: &'a LifetimeSet
) -> LifetimeRefSet<'a>
Implementors
impl UsesLifetimes for Ignored
[src]
impl UsesLifetimes for Ignored
[src]fn uses_lifetimes<'a>(
&self,
_opts: &Options,
_: &'a LifetimeSet
) -> LifetimeRefSet<'a>
[src]
&self,
_opts: &Options,
_: &'a LifetimeSet
) -> LifetimeRefSet<'a>
impl<T: UsesLifetimes> UsesLifetimes for darling_core::ast::Fields<T>
[src]
impl<T: UsesLifetimes> UsesLifetimes for darling_core::ast::Fields<T>
[src]fn uses_lifetimes<'a>(
&self,
options: &Options,
lifetimes: &'a LifetimeSet
) -> LifetimeRefSet<'a>
[src]
&self,
options: &Options,
lifetimes: &'a LifetimeSet
) -> LifetimeRefSet<'a>
impl<V: UsesLifetimes, F: UsesLifetimes> UsesLifetimes for darling_core::ast::Data<V, F>
[src]
impl<V: UsesLifetimes, F: UsesLifetimes> UsesLifetimes for darling_core::ast::Data<V, F>
[src]fn uses_lifetimes<'a>(
&self,
options: &Options,
lifetimes: &'a LifetimeSet
) -> LifetimeRefSet<'a>
[src]
&self,
options: &Options,
lifetimes: &'a LifetimeSet
) -> LifetimeRefSet<'a>