pub enum AllowableValue<'src> {
Any,
Empty,
Effective(InterpretedValue<'src>),
Implied(&'static str),
}
Expand description
Allowable values for the attribute.
Variants§
Any
Any value is accepted.
Empty
Indicates the attribute doesn’t require an explicit value. The attribute is simply turned on by being set.
Effective(InterpretedValue<'src>)
In some cases, an empty value is interpreted by the processor as one of
the allowable non-empty values. This effective value is prefixed with an
equals sign and enclosed in square brackets (e.g., [=auto]
). An
attribute reference will resolve to an empty value rather than the
effective value.
Implied(&'static str)
Built-in attributes that are not set may have an implied value. The implied value is enclosed in parentheses (e.g., (attributes)). An implied value can’t be resolved using an attribute reference.
Trait Implementations§
Source§impl<'src> Clone for AllowableValue<'src>
impl<'src> Clone for AllowableValue<'src>
Source§fn clone(&self) -> AllowableValue<'src>
fn clone(&self) -> AllowableValue<'src>
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'src> Debug for AllowableValue<'src>
impl<'src> Debug for AllowableValue<'src>
Source§impl<'src> PartialEq for AllowableValue<'src>
impl<'src> PartialEq for AllowableValue<'src>
impl<'src> Eq for AllowableValue<'src>
impl<'src> StructuralPartialEq for AllowableValue<'src>
Auto Trait Implementations§
impl<'src> Freeze for AllowableValue<'src>
impl<'src> RefUnwindSafe for AllowableValue<'src>
impl<'src> Send for AllowableValue<'src>
impl<'src> Sync for AllowableValue<'src>
impl<'src> Unpin for AllowableValue<'src>
impl<'src> UnwindSafe for AllowableValue<'src>
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