StreamEvent

Derive Macro StreamEvent 

Source
#[derive(StreamEvent)]
{
    // Attributes available to this derive:
    #[stream_event]
    #[terminal]
}
👎Deprecated since 0.2.0: No longer needed - use plain domain types with Serialize/Deserialize
Expand description

DEPRECATED: This derive macro is no longer needed.

With the caller-wraps streaming architecture, event types no longer need to implement ActivationStreamItem. Just use plain domain types with standard derives:

ⓘ
#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema)]
#[serde(tag = "event", rename_all = "snake_case")]
pub enum MyEvent {
    Data { value: String },
    Complete { result: i32 },
}

The wrapping happens at the call site via wrap_stream().