pub struct NotificationInner<T, I>where
T: Clone,{
pub sub_id: I,
pub payload: NotificationPayload<T>,
}Expand description
The notification
This is the notification that is sent to the client when an event matches a subscription
This type is serialize-only in practice: notification payloads are not
self-describing. Clients should deserialize notifications as
RawNotificationInner and decode the payload with
deserialize_payload_for_kind, using
the kind of the subscription the notification belongs to.
Fields§
§sub_id: IThe subscription ID
payload: NotificationPayload<T>The notification payload
Trait Implementations§
Source§impl<T, I> Clone for NotificationInner<T, I>
impl<T, I> Clone for NotificationInner<T, I>
Source§fn clone(&self) -> NotificationInner<T, I>
fn clone(&self) -> NotificationInner<T, I>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<T, I> Debug for NotificationInner<T, I>
impl<T, I> Debug for NotificationInner<T, I>
Source§impl<T, I> Serialize for NotificationInner<T, I>
impl<T, I> Serialize for NotificationInner<T, I>
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl<T, I> Freeze for NotificationInner<T, I>
impl<T, I> RefUnwindSafe for NotificationInner<T, I>
impl<T, I> Send for NotificationInner<T, I>
impl<T, I> Sync for NotificationInner<T, I>
impl<T, I> Unpin for NotificationInner<T, I>
impl<T, I> UnsafeUnpin for NotificationInner<T, I>
impl<T, I> UnwindSafe for NotificationInner<T, I>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more