pub struct SinkNotification {
pub title: String,
pub body: String,
pub category: String,
pub priority: String,
pub session_id: String,
pub click_url: Option<String>,
}Expand description
An owned, sink-agnostic notification payload.
Deliberately decoupled from AgentEvent::Notification (whose fields are
wire-shaped for the SSE/WS client, e.g. carrying a dedup key and a
timestamp sinks have no use for) — see SinkNotification::from_event.
Fields§
§title: String§body: String§category: StringStable wire category, e.g. "needs_approval", "run_completed" (see
bamboo_notification::policy::NotificationCategory::as_str).
priority: String"high" | "normal" | "low" (see
bamboo_notification::policy::NotificationPriority::as_str).
session_id: String§click_url: Option<String>Deep link to surface in a click-through push notification. Not yet populated by any producer — reserved for a future frontend route.
Implementations§
Source§impl SinkNotification
impl SinkNotification
Sourcepub fn from_event(event: &AgentEvent) -> Option<Self>
pub fn from_event(event: &AgentEvent) -> Option<Self>
Builds a sink-facing payload from an already-classified
AgentEvent::Notification. Returns None for any other event
variant (defensive; callers should only ever pass a Notification).
Trait Implementations§
Source§impl Clone for SinkNotification
impl Clone for SinkNotification
Source§fn clone(&self) -> SinkNotification
fn clone(&self) -> SinkNotification
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more