pub trait StreamWriterTrait:
Send
+ Sync
+ 'static {
// Required method
fn emit_custom(&self, node: &str, data: Value);
}Expand description
Non-generic stream writer trait for Runtime integration.
StreamWriter<S> is parameterized over the
state type S which prevents it from being stored directly in
Runtime<C>. This trait provides type-erased access so nodes can emit
custom stream events through the runtime regardless of the state type.
Required Methods§
Sourcefn emit_custom(&self, node: &str, data: Value)
fn emit_custom(&self, node: &str, data: Value)
Emit a custom stream data payload.
Trait Implementations§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".