pub trait NodeHandler: Clone {
type NodeData: NodeDataType;
type TraceData: TraceDataType;
// Required method
fn handle(
&self,
ctx: NodeContext<Self::NodeData, Self::TraceData>,
) -> impl Future<Output = NodeResult>;
// Provided methods
fn transform_attributes(
&self,
ctx: &NodeContext<Self::NodeData, Self::TraceData>,
) -> Option<TransformAttributes> { ... }
fn after_transform_attributes(
&self,
ctx: &NodeContext<Self::NodeData, Self::TraceData>,
) -> impl Future<Output = Result<(), NodeError>> { ... }
}
Required Associated Types§
Required Methods§
fn handle( &self, ctx: NodeContext<Self::NodeData, Self::TraceData>, ) -> impl Future<Output = NodeResult>
Provided Methods§
fn transform_attributes( &self, ctx: &NodeContext<Self::NodeData, Self::TraceData>, ) -> Option<TransformAttributes>
fn after_transform_attributes( &self, ctx: &NodeContext<Self::NodeData, Self::TraceData>, ) -> impl Future<Output = Result<(), NodeError>>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.