pub struct SceneEphemeralSubscription { /* private fields */ }Expand description
The ephemeral Scene subscription of one WebSocket connection.
The default value is inactive, which is the state before the first
SceneStreamEnable and after a SceneStreamDisable.
Implementations§
Source§impl SceneEphemeralSubscription
impl SceneEphemeralSubscription
Sourcepub fn replace_with(
&mut self,
enable: &SceneStreamEnable,
) -> Result<(), JmapError>
pub fn replace_with( &mut self, enable: &SceneStreamEnable, ) -> Result<(), JmapError>
Replaces this subscription with the one in enable.
The new frame “REPLACES any previous SceneStreamEnable
subscription in its entirety”; nothing is merged from it.
Unrecognized eventTypes values next to recognized ones are dropped
(draft-atwood-jmap-scene-wss-00 §SceneStreamEnable, Semantics).
§Errors
Returns an invalidArguments JmapError when eventTypes is an
empty array or holds only values outside SCENE_EVENT_TYPES. On
error self is unchanged, as the draft requires. The transport
sends the error as an RFC 8887 §4.3.4 RequestError frame whose
type is the full URN
"urn:ietf:params:jmap:error:invalidArguments" and whose
requestId is SceneStreamEnable::id when the client sent one;
the returned JmapError carries the short method-level name. The
connection stays open.
Sourcepub fn filter(&self) -> Option<&SceneStreamFilter>
pub fn filter(&self) -> Option<&SceneStreamFilter>
The active filters, or None when no subscription is enabled.