pub(crate) enum StandardAttribute<'a> {
String(String),
List(&'a MetaList),
Empty,
}
Expand description
Helper type for parsing standard attributes. A standard attribute typically will accept the forms:
#[attr = "foo"]
and#[attr("foo")]
for a simple string#[attr(....)]
for a more complicated context#[attr]
for a “defaulting” context
This allows attributes to parse simple string values without caring too much about the NameValue vs List representation and then attributes can choose to handle more complicated lists if they so desire.
Variants§
Implementations§
Auto Trait Implementations§
impl<'a> Freeze for StandardAttribute<'a>
impl<'a> RefUnwindSafe for StandardAttribute<'a>
impl<'a> !Send for StandardAttribute<'a>
impl<'a> !Sync for StandardAttribute<'a>
impl<'a> Unpin for StandardAttribute<'a>
impl<'a> UnwindSafe for StandardAttribute<'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