#[non_exhaustive]pub struct FieldAttributeInfo<'a> {
pub type_name: &'a str,
pub type_kind: TypeKind,
pub field_name: &'a str,
pub field_type_name: Option<&'a str>,
}Expand description
Relevant information about a field to which new attributes will be added using
ParseCallbacks::field_attributes.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.type_name: &'a strThe name of the containing type (struct/union).
type_kind: TypeKindThe kind of the containing type.
field_name: &'a strThe name of the field.
For newtype tuple structs (when using --default-alias-style=new_type),
this will be "0" for the inner field.
field_type_name: Option<&'a str>The name of the field’s type, if available.
Trait Implementations§
Source§impl<'a> Clone for FieldAttributeInfo<'a>
impl<'a> Clone for FieldAttributeInfo<'a>
Source§fn clone(&self) -> FieldAttributeInfo<'a>
fn clone(&self) -> FieldAttributeInfo<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for FieldAttributeInfo<'a>
impl<'a> Debug for FieldAttributeInfo<'a>
Source§impl<'a> PartialEq for FieldAttributeInfo<'a>
impl<'a> PartialEq for FieldAttributeInfo<'a>
impl<'a> Copy for FieldAttributeInfo<'a>
impl<'a> Eq for FieldAttributeInfo<'a>
impl<'a> StructuralPartialEq for FieldAttributeInfo<'a>
Auto Trait Implementations§
impl<'a> Freeze for FieldAttributeInfo<'a>
impl<'a> RefUnwindSafe for FieldAttributeInfo<'a>
impl<'a> Send for FieldAttributeInfo<'a>
impl<'a> Sync for FieldAttributeInfo<'a>
impl<'a> Unpin for FieldAttributeInfo<'a>
impl<'a> UnwindSafe for FieldAttributeInfo<'a>
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more