Trait darling::usage::UsesTypeParams
[−]
[src]
pub trait UsesTypeParams { fn uses_type_params(
&self,
options: &Options,
type_set: &'a HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'a Ident, BuildHasherDefault<FnvHasher>>; }
Searcher for finding type params in a syntax tree. This can be used to determine if a given type parameter needs to be bounded in a generated impl.
Required Methods
fn uses_type_params(
&self,
options: &Options,
type_set: &'a HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'a Ident, BuildHasherDefault<FnvHasher>>
&self,
options: &Options,
type_set: &'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.
This method only accounts for direct usage by the element; indirect usage via bounds or where
predicates are not detected.
Implementations on Foreign Types
impl UsesTypeParams for DataEnum
[src]
fn uses_type_params(
&self,
options: &Options,
type_set: &'gen HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'gen Ident, BuildHasherDefault<FnvHasher>>
[src]
&self,
options: &Options,
type_set: &'gen HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'gen Ident, BuildHasherDefault<FnvHasher>>
impl UsesTypeParams for AngleBracketedGenericArguments
[src]
fn uses_type_params(
&self,
options: &Options,
type_set: &'gen HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'gen Ident, BuildHasherDefault<FnvHasher>>
[src]
&self,
options: &Options,
type_set: &'gen HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'gen Ident, BuildHasherDefault<FnvHasher>>
impl<T, U> UsesTypeParams for Punctuated<T, U> where
T: UsesTypeParams,
[src]
T: UsesTypeParams,
fn uses_type_params(
&self,
options: &Options,
type_set: &'a HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'a Ident, BuildHasherDefault<FnvHasher>>
[src]
&self,
options: &Options,
type_set: &'a HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'a Ident, BuildHasherDefault<FnvHasher>>
impl UsesTypeParams for Data
[src]
fn uses_type_params(
&self,
options: &Options,
type_set: &'a HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'a Ident, BuildHasherDefault<FnvHasher>>
[src]
&self,
options: &Options,
type_set: &'a HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'a Ident, BuildHasherDefault<FnvHasher>>
impl UsesTypeParams for TypeTraitObject
[src]
fn uses_type_params(
&self,
options: &Options,
type_set: &'gen HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'gen Ident, BuildHasherDefault<FnvHasher>>
[src]
&self,
options: &Options,
type_set: &'gen HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'gen Ident, BuildHasherDefault<FnvHasher>>
impl UsesTypeParams for TraitBound
[src]
fn uses_type_params(
&self,
options: &Options,
type_set: &'gen HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'gen Ident, BuildHasherDefault<FnvHasher>>
[src]
&self,
options: &Options,
type_set: &'gen HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'gen Ident, BuildHasherDefault<FnvHasher>>
impl UsesTypeParams for DataUnion
[src]
fn uses_type_params(
&self,
options: &Options,
type_set: &'gen HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'gen Ident, BuildHasherDefault<FnvHasher>>
[src]
&self,
options: &Options,
type_set: &'gen HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'gen Ident, BuildHasherDefault<FnvHasher>>
impl<T> UsesTypeParams for Option<T> where
T: UsesTypeParams,
[src]
T: UsesTypeParams,
fn uses_type_params(
&self,
options: &Options,
type_set: &'a HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'a Ident, BuildHasherDefault<FnvHasher>>
[src]
&self,
options: &Options,
type_set: &'a HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'a Ident, BuildHasherDefault<FnvHasher>>
impl UsesTypeParams for ReturnType
[src]
fn uses_type_params(
&self,
options: &Options,
type_set: &'a HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'a Ident, BuildHasherDefault<FnvHasher>>
[src]
&self,
options: &Options,
type_set: &'a HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'a Ident, BuildHasherDefault<FnvHasher>>
impl UsesTypeParams for TypeReference
[src]
fn uses_type_params(
&self,
options: &Options,
type_set: &'gen HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'gen Ident, BuildHasherDefault<FnvHasher>>
[src]
&self,
options: &Options,
type_set: &'gen HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'gen Ident, BuildHasherDefault<FnvHasher>>
impl UsesTypeParams for WherePredicate
[src]
fn uses_type_params(
&self,
options: &Options,
type_set: &'a HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'a Ident, BuildHasherDefault<FnvHasher>>
[src]
&self,
options: &Options,
type_set: &'a HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'a Ident, BuildHasherDefault<FnvHasher>>
impl UsesTypeParams for Variant
[src]
fn uses_type_params(
&self,
options: &Options,
type_set: &'gen HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'gen Ident, BuildHasherDefault<FnvHasher>>
[src]
&self,
options: &Options,
type_set: &'gen HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'gen Ident, BuildHasherDefault<FnvHasher>>
impl UsesTypeParams for Ident
[src]
Check if an Ident exactly matches one of the sought-after type parameters.
fn uses_type_params(
&self,
_options: &Options,
type_set: &'a HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'a Ident, BuildHasherDefault<FnvHasher>>
[src]
&self,
_options: &Options,
type_set: &'a HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'a Ident, BuildHasherDefault<FnvHasher>>
impl<T> UsesTypeParams for Vec<T> where
T: UsesTypeParams,
[src]
T: UsesTypeParams,
fn uses_type_params(
&self,
options: &Options,
type_set: &'a HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'a Ident, BuildHasherDefault<FnvHasher>>
[src]
&self,
options: &Options,
type_set: &'a HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'a Ident, BuildHasherDefault<FnvHasher>>
impl UsesTypeParams for Path
[src]
fn uses_type_params(
&self,
options: &Options,
type_set: &'a HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'a Ident, BuildHasherDefault<FnvHasher>>
[src]
&self,
options: &Options,
type_set: &'a HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'a Ident, BuildHasherDefault<FnvHasher>>
impl UsesTypeParams for DataStruct
[src]
fn uses_type_params(
&self,
options: &Options,
type_set: &'gen HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'gen Ident, BuildHasherDefault<FnvHasher>>
[src]
&self,
options: &Options,
type_set: &'gen HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'gen Ident, BuildHasherDefault<FnvHasher>>
impl UsesTypeParams for Fields
[src]
fn uses_type_params(
&self,
options: &Options,
type_set: &'a HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'a Ident, BuildHasherDefault<FnvHasher>>
[src]
&self,
options: &Options,
type_set: &'a HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'a Ident, BuildHasherDefault<FnvHasher>>
impl UsesTypeParams for TypePtr
[src]
fn uses_type_params(
&self,
options: &Options,
type_set: &'gen HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'gen Ident, BuildHasherDefault<FnvHasher>>
[src]
&self,
options: &Options,
type_set: &'gen HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'gen Ident, BuildHasherDefault<FnvHasher>>
impl UsesTypeParams for TypeBareFn
[src]
fn uses_type_params(
&self,
options: &Options,
type_set: &'gen HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'gen Ident, BuildHasherDefault<FnvHasher>>
[src]
&self,
options: &Options,
type_set: &'gen HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'gen Ident, BuildHasherDefault<FnvHasher>>
impl UsesTypeParams for TypeParen
[src]
fn uses_type_params(
&self,
options: &Options,
type_set: &'gen HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'gen Ident, BuildHasherDefault<FnvHasher>>
[src]
&self,
options: &Options,
type_set: &'gen HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'gen Ident, BuildHasherDefault<FnvHasher>>
impl UsesTypeParams for TypeImplTrait
[src]
fn uses_type_params(
&self,
options: &Options,
type_set: &'gen HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'gen Ident, BuildHasherDefault<FnvHasher>>
[src]
&self,
options: &Options,
type_set: &'gen HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'gen Ident, BuildHasherDefault<FnvHasher>>
impl<'a> UsesTypeParams for Variant<'a>
[src]
fn uses_type_params(
&self,
options: &Options,
type_set: &'b HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'b Ident, BuildHasherDefault<FnvHasher>>
[src]
&self,
options: &Options,
type_set: &'b HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'b Ident, BuildHasherDefault<FnvHasher>>
impl UsesTypeParams for FieldsNamed
[src]
fn uses_type_params(
&self,
options: &Options,
type_set: &'gen HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'gen Ident, BuildHasherDefault<FnvHasher>>
[src]
&self,
options: &Options,
type_set: &'gen HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'gen Ident, BuildHasherDefault<FnvHasher>>
impl UsesTypeParams for TypeParamBound
[src]
fn uses_type_params(
&self,
options: &Options,
type_set: &'a HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'a Ident, BuildHasherDefault<FnvHasher>>
[src]
&self,
options: &Options,
type_set: &'a HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'a Ident, BuildHasherDefault<FnvHasher>>
impl UsesTypeParams for Type
[src]
fn uses_type_params(
&self,
options: &Options,
type_set: &'a HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'a Ident, BuildHasherDefault<FnvHasher>>
[src]
&self,
options: &Options,
type_set: &'a HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'a Ident, BuildHasherDefault<FnvHasher>>
impl UsesTypeParams for BareFnArg
[src]
fn uses_type_params(
&self,
options: &Options,
type_set: &'gen HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'gen Ident, BuildHasherDefault<FnvHasher>>
[src]
&self,
options: &Options,
type_set: &'gen HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'gen Ident, BuildHasherDefault<FnvHasher>>
impl<'a> UsesTypeParams for Field<'a>
[src]
fn uses_type_params(
&self,
options: &Options,
type_set: &'b HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'b Ident, BuildHasherDefault<FnvHasher>>
[src]
&self,
options: &Options,
type_set: &'b HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'b Ident, BuildHasherDefault<FnvHasher>>
impl UsesTypeParams for GenericArgument
[src]
fn uses_type_params(
&self,
options: &Options,
type_set: &'a HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'a Ident, BuildHasherDefault<FnvHasher>>
[src]
&self,
options: &Options,
type_set: &'a HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'a Ident, BuildHasherDefault<FnvHasher>>
impl UsesTypeParams for PredicateEq
[src]
fn uses_type_params(
&self,
options: &Options,
type_set: &'gen HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'gen Ident, BuildHasherDefault<FnvHasher>>
[src]
&self,
options: &Options,
type_set: &'gen HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'gen Ident, BuildHasherDefault<FnvHasher>>
impl UsesTypeParams for TypeArray
[src]
fn uses_type_params(
&self,
options: &Options,
type_set: &'gen HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'gen Ident, BuildHasherDefault<FnvHasher>>
[src]
&self,
options: &Options,
type_set: &'gen HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'gen Ident, BuildHasherDefault<FnvHasher>>
impl UsesTypeParams for Field
[src]
fn uses_type_params(
&self,
options: &Options,
type_set: &'gen HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'gen Ident, BuildHasherDefault<FnvHasher>>
[src]
&self,
options: &Options,
type_set: &'gen HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'gen Ident, BuildHasherDefault<FnvHasher>>
impl UsesTypeParams for PredicateType
[src]
fn uses_type_params(
&self,
options: &Options,
type_set: &'gen HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'gen Ident, BuildHasherDefault<FnvHasher>>
[src]
&self,
options: &Options,
type_set: &'gen HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'gen Ident, BuildHasherDefault<FnvHasher>>
impl UsesTypeParams for ()
[src]
fn uses_type_params(
&self,
_options: &Options,
_type_set: &'a HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'a Ident, BuildHasherDefault<FnvHasher>>
[src]
&self,
_options: &Options,
_type_set: &'a HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'a Ident, BuildHasherDefault<FnvHasher>>
impl UsesTypeParams for ParenthesizedGenericArguments
[src]
fn uses_type_params(
&self,
options: &Options,
type_set: &'gen HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'gen Ident, BuildHasherDefault<FnvHasher>>
[src]
&self,
options: &Options,
type_set: &'gen HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'gen Ident, BuildHasherDefault<FnvHasher>>
impl UsesTypeParams for TypeSlice
[src]
fn uses_type_params(
&self,
options: &Options,
type_set: &'gen HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'gen Ident, BuildHasherDefault<FnvHasher>>
[src]
&self,
options: &Options,
type_set: &'gen HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'gen Ident, BuildHasherDefault<FnvHasher>>
impl UsesTypeParams for Binding
[src]
fn uses_type_params(
&self,
options: &Options,
type_set: &'gen HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'gen Ident, BuildHasherDefault<FnvHasher>>
[src]
&self,
options: &Options,
type_set: &'gen HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'gen Ident, BuildHasherDefault<FnvHasher>>
impl UsesTypeParams for QSelf
[src]
fn uses_type_params(
&self,
options: &Options,
type_set: &'gen HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'gen Ident, BuildHasherDefault<FnvHasher>>
[src]
&self,
options: &Options,
type_set: &'gen HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'gen Ident, BuildHasherDefault<FnvHasher>>
impl UsesTypeParams for PathArguments
[src]
fn uses_type_params(
&self,
options: &Options,
type_set: &'a HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'a Ident, BuildHasherDefault<FnvHasher>>
[src]
&self,
options: &Options,
type_set: &'a HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'a Ident, BuildHasherDefault<FnvHasher>>
impl UsesTypeParams for TypeGroup
[src]
fn uses_type_params(
&self,
options: &Options,
type_set: &'gen HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'gen Ident, BuildHasherDefault<FnvHasher>>
[src]
&self,
options: &Options,
type_set: &'gen HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'gen Ident, BuildHasherDefault<FnvHasher>>
impl UsesTypeParams for TypePath
[src]
fn uses_type_params(
&self,
options: &Options,
type_set: &'a HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'a Ident, BuildHasherDefault<FnvHasher>>
[src]
&self,
options: &Options,
type_set: &'a HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'a Ident, BuildHasherDefault<FnvHasher>>
impl UsesTypeParams for TypeTuple
[src]
fn uses_type_params(
&self,
options: &Options,
type_set: &'gen HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'gen Ident, BuildHasherDefault<FnvHasher>>
[src]
&self,
options: &Options,
type_set: &'gen HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'gen Ident, BuildHasherDefault<FnvHasher>>
Implementors
impl UsesTypeParams for Ignored
impl<V, F> UsesTypeParams for darling::ast::Data<V, F> where
F: UsesTypeParams,
V: UsesTypeParams,impl<T> UsesTypeParams for darling::ast::Fields<T> where
T: UsesTypeParams,