pub struct LabelCtx {
pub label: String,
pub params: Value,
pub body: AnnotationBody,
pub node: NodeRef,
}Expand description
The payload every hook receives. Describes a single label invocation: its parameters, body, and position in the source AST.
Fields§
§label: StringFully-qualified label name, e.g. "acme.commenting".
params: ValueParam values, validated against the schema before dispatch. Always an
object; defaults are filled in. (Stored as serde_json::Value rather
than a typed map to keep the wire format generic.)
body: AnnotationBodyBody content. Shape depends on the schema’s body.kind.
node: NodeRefThe host AST node the label is attached to.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for LabelCtx
impl<'de> Deserialize<'de> for LabelCtx
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
impl StructuralPartialEq for LabelCtx
Auto Trait Implementations§
impl Freeze for LabelCtx
impl RefUnwindSafe for LabelCtx
impl Send for LabelCtx
impl Sync for LabelCtx
impl Unpin for LabelCtx
impl UnsafeUnpin for LabelCtx
impl UnwindSafe for LabelCtx
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