Enum virtue::parse::AttributeLocation
source · #[non_exhaustive]pub enum AttributeLocation {
Container,
Variant,
Field,
}
Expand description
The location an attribute can be found at
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Container
The attribute is on a container, which will be either a struct
or an enum
Variant
The attribute is on an enum variant
Field
The attribute is on a field, which can either be a struct field or an enum variant field
ⓘ
struct Foo {
#[attr] // here
pub a: u8
}
struct Bar {
Baz {
#[attr] // or here
a: u8
}
}
Trait Implementations§
source§impl Clone for AttributeLocation
impl Clone for AttributeLocation
source§fn clone(&self) -> AttributeLocation
fn clone(&self) -> AttributeLocation
Returns a copy 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 Debug for AttributeLocation
impl Debug for AttributeLocation
source§impl Hash for AttributeLocation
impl Hash for AttributeLocation
source§impl PartialEq for AttributeLocation
impl PartialEq for AttributeLocation
source§fn eq(&self, other: &AttributeLocation) -> bool
fn eq(&self, other: &AttributeLocation) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for AttributeLocation
impl Eq for AttributeLocation
impl StructuralPartialEq for AttributeLocation
Auto Trait Implementations§
impl Freeze for AttributeLocation
impl RefUnwindSafe for AttributeLocation
impl Send for AttributeLocation
impl Sync for AttributeLocation
impl Unpin for AttributeLocation
impl UnwindSafe for AttributeLocation
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