Struct darling_core::options::Core
[−]
[src]
pub struct Core { pub ident: Ident, pub generics: Generics, pub default: Option<DefaultExpression>, pub rename_rule: RenameRule, pub map: Option<Path>, pub data: Data<InputVariant, InputField>, pub bound: Option<Vec<WherePredicate>>, }
A struct or enum which should have FromMeta
or FromDeriveInput
implementations
generated.
Fields
ident: Ident
The type identifier.
generics: Generics
The type's generics. If the type does not use any generics, this will be an empty instance.
default: Option<DefaultExpression>
Controls whether missing properties should cause errors or should be filled by the result of a function call. This can be overridden at the field level.
rename_rule: RenameRule
The rule that should be used to rename all fields/variants in the container.
map: Option<Path>
An infallible function with the signature FnOnce(T) -> T
which will be called after the
target instance is successfully constructed.
data: Data<InputVariant, InputField>
The body of the deriving type.
bound: Option<Vec<WherePredicate>>
The custom bound to apply to the generated impl
Methods
impl Core
[src]
pub fn start(di: &DeriveInput) -> Self
[src]
Partially initializes Core
by reading the identity, generics, and body shape.
Trait Implementations
impl Debug for Core
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Clone for Core
[src]
fn clone(&self) -> Core
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialEq for Core
[src]
fn eq(&self, __arg_0: &Core) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Core) -> bool
[src]
This method tests for !=
.
impl Eq for Core
[src]
impl ParseAttribute for Core
[src]
fn parse_nested(&mut self, mi: &Meta) -> Result<()>
[src]
Read a meta-item, and apply its values to the current instance.
fn parse_attributes(self, attrs: &[Attribute]) -> Result<Self>
[src]
impl ParseData for Core
[src]
fn parse_variant(&mut self, variant: &Variant) -> Result<()>
[src]
Apply the next found variant to the object, returning an error if parsing goes wrong. Read more
fn parse_field(&mut self, field: &Field) -> Result<()>
[src]
Apply the next found struct field to the object, returning an error if parsing goes wrong. Read more