pub enum AnnotationTargetKind {
Function,
Type,
Module,
Expression,
Block,
AwaitExpr,
Binding,
}Expand description
Describes what kind of syntax element an annotation is targeting. Used for compile-time validation of annotation applicability.
Variants§
Function
@annotation before a function definition
Type
@annotation before a type/struct/enum definition
Module
@annotation before a module definition
Expression
@annotation before an arbitrary expression
Block
@annotation before a block expression
AwaitExpr
@annotation inside an await expression: await @timeout(5s) expr
Binding
@annotation before a let/var/const binding
Trait Implementations§
Source§impl Clone for AnnotationTargetKind
impl Clone for AnnotationTargetKind
Source§fn clone(&self) -> AnnotationTargetKind
fn clone(&self) -> AnnotationTargetKind
Returns a duplicate 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 AnnotationTargetKind
impl Debug for AnnotationTargetKind
Source§impl<'de> Deserialize<'de> for AnnotationTargetKind
impl<'de> Deserialize<'de> for AnnotationTargetKind
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for AnnotationTargetKind
impl PartialEq for AnnotationTargetKind
Source§impl Serialize for AnnotationTargetKind
impl Serialize for AnnotationTargetKind
impl Copy for AnnotationTargetKind
impl Eq for AnnotationTargetKind
impl StructuralPartialEq for AnnotationTargetKind
Auto Trait Implementations§
impl Freeze for AnnotationTargetKind
impl RefUnwindSafe for AnnotationTargetKind
impl Send for AnnotationTargetKind
impl Sync for AnnotationTargetKind
impl Unpin for AnnotationTargetKind
impl UnsafeUnpin for AnnotationTargetKind
impl UnwindSafe for AnnotationTargetKind
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