struct Parameters {
local: Ident,
this_type: Path,
this_value: Path,
generics: Generics,
borrowed: BorrowedLifetimes,
has_getter: bool,
is_packed: bool,
}Fields§
§local: IdentName of the type the derive is on.
this_type: PathPath to the type the impl is for. Either a single Ident for local
types (does not include generic parameters) or some::remote::Path for
remote types.
this_value: PathSame as this_type but using ::<T> for generic parameters for use in
expression position.
generics: GenericsGenerics including any explicit and inferred bounds for the impl.
borrowed: BorrowedLifetimesLifetimes borrowed from the deserializer. These will become bounds on
the 'de lifetime of the deserializer.
has_getter: boolAt least one field has a serde(getter) attribute, implying that the remote type has a private field.
is_packed: boolType has a repr(packed) attribute.
Implementations§
Source§impl Parameters
impl Parameters
fn new(cont: &Container<'_>) -> Self
Sourcefn type_name(&self) -> String
fn type_name(&self) -> String
Type name to use in error messages and &'static str arguments to
various Deserializer methods.
Sourcefn generics_with_de_lifetime(
&self,
) -> (DeImplGenerics<'_>, DeTypeGenerics<'_>, TypeGenerics<'_>, Option<&WhereClause>)
fn generics_with_de_lifetime( &self, ) -> (DeImplGenerics<'_>, DeTypeGenerics<'_>, TypeGenerics<'_>, Option<&WhereClause>)
Split the data structure’s generics into the pieces to use for its
Deserialize impl, augmented with an additional 'de lifetime for use
as the Deserialize trait’s lifetime.