pub struct WsEvent {
pub topic: &'static str,
pub payload: Value,
}Fields§
§topic: &'static str§payload: ValueImplementations§
Source§impl WsEvent
impl WsEvent
pub fn announce(record: &AnnounceRecord) -> Self
pub fn packet(record: &PacketRecord) -> Self
pub fn proof(record: &ProofRecord) -> Self
pub fn link(record: &LinkEventRecord) -> Self
pub fn resource(record: &ResourceEventRecord) -> Self
pub fn to_json(&self) -> String
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WsEvent
impl RefUnwindSafe for WsEvent
impl Send for WsEvent
impl Sync for WsEvent
impl Unpin for WsEvent
impl UnwindSafe for WsEvent
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