pub struct SubscriptionRequest {
pub uri: String,
pub action: SubscriptionAction,
pub condition: Option<Value>,
}Expand description
A resource (un)subscription an agent requested for itself via the
subscribe/unsubscribe/await_resource self-tools. The reactive daemon
applies it to its live subscriptions + router after the run, so an agent can
widen or narrow what wakes it. Honoured only under a daemon. Not Eq,
because a condition may carry a JSON number.
Fields§
§uri: String§action: SubscriptionAction§condition: Option<Value>Optional content predicate (raw self-tool args, e.g.
{"pointer":"/status","op":"eq","value":"ready"}) for a conditional
await_resource subscribe — the route fires only when the resource content
satisfies it. Validated at tool-call time, then re-parsed into a
content-predicate condition when the daemon arms the route. None means
fire on any update (plain subscribe). Skipped in the wire form when
absent, so an unsubscribe / plain subscribe carries no extra key.
Trait Implementations§
Source§impl Clone for SubscriptionRequest
impl Clone for SubscriptionRequest
Source§fn clone(&self) -> SubscriptionRequest
fn clone(&self) -> SubscriptionRequest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more