pub struct SubscribeEventsSessionParams<'a> {
pub types: Option<&'a str>,
pub close_after: Option<&'a str>,
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("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<&'a str>closeafter template variable: "state" to close after the
first state-change push, "no" for stay-open. 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).
Trait Implementations§
Source§impl<'a> Clone for SubscribeEventsSessionParams<'a>
impl<'a> Clone for SubscribeEventsSessionParams<'a>
Source§fn clone(&self) -> SubscribeEventsSessionParams<'a>
fn clone(&self) -> SubscribeEventsSessionParams<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more