Enum mpc_websocket::Notification
source · [−]pub enum Notification {
Noop,
Group {
group_id: Uuid,
filter: Option<Vec<usize>>,
response: Response,
},
Session {
group_id: Uuid,
session_id: Uuid,
filter: Option<Vec<usize>>,
response: Response,
},
Relay {
messages: Vec<(usize, Response)>,
},
}
Expand description
Notification sent by the server to multiple connected clients.
Variants
Noop
Indicates that the response should be ignored and no notification messages should be sent.
This is used when testing a threshold for sending notifications; before a threshold has been reached we want to return a response but not actually send any notifications.
Group
Sends the response to all clients in the group.
Session
Fields
group_id: Uuid
The group identifier.
session_id: Uuid
The session identifier.
response: Response
Message to send to the clients.
Sends the response to all clients in the session.
Relay
Relay messages to specific clients.
Used for relaying peer to peer messages.
Trait Implementations
sourceimpl Debug for Notification
impl Debug for Notification
Auto Trait Implementations
impl RefUnwindSafe for Notification
impl Send for Notification
impl Sync for Notification
impl Unpin for Notification
impl UnwindSafe for Notification
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more