pub struct FromFieldOptions {
pub base: OuterFrom,
pub vis: Option<Ident>,
pub ty: Option<Ident>,
}
Fields§
§base: OuterFrom
§vis: Option<Ident>
§ty: Option<Ident>
Implementations§
source§impl FromFieldOptions
impl FromFieldOptions
pub fn new(di: &DeriveInput) -> Result<Self>
Trait Implementations§
source§impl Debug for FromFieldOptions
impl Debug for FromFieldOptions
source§impl<'a> From<&'a FromFieldOptions> for FromFieldImpl<'a>
impl<'a> From<&'a FromFieldOptions> for FromFieldImpl<'a>
source§fn from(v: &'a FromFieldOptions) -> Self
fn from(v: &'a FromFieldOptions) -> Self
Converts to this type from the input type.
source§impl ParseAttribute for FromFieldOptions
impl ParseAttribute for FromFieldOptions
source§impl ParseData for FromFieldOptions
impl ParseData for FromFieldOptions
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 FromFieldOptions
impl ToTokens for FromFieldOptions
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 FromFieldOptions
impl RefUnwindSafe for FromFieldOptions
impl !Send for FromFieldOptions
impl !Sync for FromFieldOptions
impl Unpin for FromFieldOptions
impl UnwindSafe for FromFieldOptions
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.