pub struct AnnotationHandler {
pub handler_type: AnnotationHandlerType,
pub params: Vec<AnnotationHandlerParam>,
pub return_type: Option<TypeAnnotation>,
pub body: Expr,
pub span: Span,
}Expand description
A lifecycle handler within an annotation definition
Fields§
§handler_type: AnnotationHandlerTypeType of handler (on_define, before, after, metadata)
params: Vec<AnnotationHandlerParam>Handler parameters (e.g., fn, ctx for on_define)
return_type: Option<TypeAnnotation>Optional return type annotation
body: ExprHandler body (a block expression)
span: SpanSpan for error reporting
Trait Implementations§
Source§impl Clone for AnnotationHandler
impl Clone for AnnotationHandler
Source§fn clone(&self) -> AnnotationHandler
fn clone(&self) -> AnnotationHandler
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 AnnotationHandler
impl Debug for AnnotationHandler
Source§impl<'de> Deserialize<'de> for AnnotationHandler
impl<'de> Deserialize<'de> for AnnotationHandler
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 AnnotationHandler
impl PartialEq for AnnotationHandler
Source§impl Serialize for AnnotationHandler
impl Serialize for AnnotationHandler
impl StructuralPartialEq for AnnotationHandler
Auto Trait Implementations§
impl Freeze for AnnotationHandler
impl RefUnwindSafe for AnnotationHandler
impl Send for AnnotationHandler
impl Sync for AnnotationHandler
impl Unpin for AnnotationHandler
impl UnsafeUnpin for AnnotationHandler
impl UnwindSafe for AnnotationHandler
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