pub struct SubscribeEventsSessionParams<'a> {
pub types: Option<&'a str>,
pub close_after: Option<CloseAfter>,
pub ping: Option<u32>,
pub last_event_id: Option<&'a str>,
}Expand description
Parameters for JmapClient::subscribe_events_session
(bd:JMAP-6r7c.64).
Carries the RFC 8620 §7.3 event_source_url template variables
(types, closeafter, ping) plus the optional Last-Event-ID
header (RFC 8895 §9). None template values expand to an empty
string per the RFC’s default-omission semantics.
Construct with a struct literal:
client.subscribe_events_session(&session, SubscribeEventsSessionParams {
types: Some("Email,Mailbox"),
close_after: Some(CloseAfter::State),
ping: Some(60),
last_event_id: Some("evt-1234"),
}).await?;Fields§
§types: Option<&'a str>types template variable: comma-separated list of JMAP data-type
names to subscribe to ("Email,Mailbox"), or "*" for all types
the server supports. None expands to an empty string.
close_after: Option<CloseAfter>closeafter template variable (see CloseAfter). None
expands to an empty string.
ping: Option<u32>ping template variable: server-ping interval in seconds, or
0 to disable. None expands to an empty string.
last_event_id: Option<&'a str>Optional Last-Event-ID header for resumption (RFC 8895 §9).