pub enum AttrValue {
String(String),
Int(u64),
ByteList(Vec<u8>),
Flag,
}Expand description
Right-hand side of an attribute. Kept small on purpose — every new variant has to round-trip through emit + parse + lower.
Variants§
String(String)
"…" — quoted string.
Int(u64)
0x… or decimal integer.
ByteList(Vec<u8>)
[0x01, 0x02, …] — used by head_bytes and friends.
Flag
Bare flag, e.g. #[naked] — no =value part. Renders
as just the key name; parses from any attribute that
omits the = sign.
Trait Implementations§
impl Eq for AttrValue
impl StructuralPartialEq for AttrValue
Auto Trait Implementations§
impl Freeze for AttrValue
impl RefUnwindSafe for AttrValue
impl Send for AttrValue
impl Sync for AttrValue
impl Unpin for AttrValue
impl UnsafeUnpin for AttrValue
impl UnwindSafe for AttrValue
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