pub struct Notification {
pub event: String,
pub path: String,
pub headers: Vec<Header>,
pub body: Vec<u8>,
}Expand description
Notification is a server-push message delivered out-of-band on a NWEP connection.
Notifications are received via the callback registered with
ClientBuilder::on_notify and carry an event name, a path, optional
headers, and a body payload.
Fields§
§event: StringEvent type string identifying the kind of notification (e.g. "update", "ping").
path: StringPath associated with the notification, typically the resource that changed.
headers: Vec<Header>Additional metadata sent with the notification.
body: Vec<u8>Notification payload bytes.
Trait Implementations§
Source§impl Clone for Notification
impl Clone for Notification
Source§fn clone(&self) -> Notification
fn clone(&self) -> Notification
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for Notification
impl RefUnwindSafe for Notification
impl Send for Notification
impl Sync for Notification
impl Unpin for Notification
impl UnsafeUnpin for Notification
impl UnwindSafe for Notification
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