pub struct FromAttributesOptions {
pub base: OuterFrom,
}
Expand description
Receiver for derived FromAttributes
impls.
Fields§
§base: OuterFrom
Implementations§
source§impl FromAttributesOptions
impl FromAttributesOptions
pub fn new(di: &DeriveInput) -> Result<Self>
fn is_newtype(&self) -> bool
Trait Implementations§
source§impl<'a> From<&'a FromAttributesOptions> for FromAttributesImpl<'a>
impl<'a> From<&'a FromAttributesOptions> for FromAttributesImpl<'a>
source§fn from(v: &'a FromAttributesOptions) -> Self
fn from(v: &'a FromAttributesOptions) -> Self
Converts to this type from the input type.
source§impl ParseData for FromAttributesOptions
impl ParseData for FromAttributesOptions
source§fn parse_variant(&mut self, variant: &Variant) -> Result<()>
fn parse_variant(&mut self, variant: &Variant) -> Result<()>
Apply the next found variant to the object, returning an error
if parsing goes wrong.
source§fn parse_field(&mut self, field: &Field) -> Result<()>
fn parse_field(&mut self, field: &Field) -> Result<()>
Apply the next found struct field to the object, returning an error
if parsing goes wrong.
source§fn validate_body(&self, errors: &mut Accumulator)
fn validate_body(&self, errors: &mut Accumulator)
Perform validation checks that require data from more than one field or variant.
The default implementation does no validations.
Implementors can override this method as appropriate for their use-case.
fn parse_body(self, body: &Data) -> Result<Self>
source§impl ToTokens for FromAttributesOptions
impl ToTokens for FromAttributesOptions
source§fn to_tokens(&self, tokens: &mut TokenStream)
fn to_tokens(&self, tokens: &mut TokenStream)
source§fn to_token_stream(&self) -> TokenStream
fn to_token_stream(&self) -> TokenStream
source§fn into_token_stream(self) -> TokenStreamwhere
Self: Sized,
fn into_token_stream(self) -> TokenStreamwhere
Self: Sized,
Auto Trait Implementations§
impl Freeze for FromAttributesOptions
impl RefUnwindSafe for FromAttributesOptions
impl !Send for FromAttributesOptions
impl !Sync for FromAttributesOptions
impl Unpin for FromAttributesOptions
impl UnwindSafe for FromAttributesOptions
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> Spanned for T
impl<T> Spanned for T
source§fn span(&self) -> Span
fn span(&self) -> Span
Returns a
Span
covering the complete contents of this syntax tree
node, or Span::call_site()
if this node is empty.