pub struct DeriveAttribute<'a> {
pub ast: &'a Attribute,
pub derives: Vec<Path>,
}Fields§
§ast: &'a Attribute§derives: Vec<Path>Implementations§
Source§impl<'a> DeriveAttribute<'a>
impl<'a> DeriveAttribute<'a>
pub fn parse(ast: &'a Attribute) -> Result<Self>
Sourcepub fn parse_from(ast: &'a Attribute, effective: &Attribute) -> Result<Self>
pub fn parse_from(ast: &'a Attribute, effective: &Attribute) -> Result<Self>
Parse a derive attribute using the effective attribute for content extraction.
ast is stored as the original attribute reference (for error spans).
effective is used to parse the actual derive list.
Trait Implementations§
Source§impl<'a> Debug for DeriveAttribute<'a>
impl<'a> Debug for DeriveAttribute<'a>
Source§impl<'a> From<DeriveAttribute<'a>> for Attribute<'a>
impl<'a> From<DeriveAttribute<'a>> for Attribute<'a>
Source§fn from(value: DeriveAttribute<'a>) -> Self
fn from(value: DeriveAttribute<'a>) -> Self
Converts to this type from the input type.
Source§impl<'a> PartialEq for DeriveAttribute<'a>
impl<'a> PartialEq for DeriveAttribute<'a>
Source§fn eq(&self, other: &DeriveAttribute<'a>) -> bool
fn eq(&self, other: &DeriveAttribute<'a>) -> bool
Tests for
self and other values to be equal, and is used by ==.impl<'a> StructuralPartialEq for DeriveAttribute<'a>
Auto Trait Implementations§
impl<'a> !Send for DeriveAttribute<'a>
impl<'a> !Sync for DeriveAttribute<'a>
impl<'a> Freeze for DeriveAttribute<'a>
impl<'a> RefUnwindSafe for DeriveAttribute<'a>
impl<'a> Unpin for DeriveAttribute<'a>
impl<'a> UnsafeUnpin for DeriveAttribute<'a>
impl<'a> UnwindSafe for DeriveAttribute<'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