Skip to main content

ServerPush

Trait ServerPush 

Source
pub trait ServerPush: Serialize + DeserializeOwned {
    const KIND: &'static str;
}
Expand description

A server push kind: implemented by every push of this crate (e.g. ChatMessage for chat.message).

Methods added later always come with a default implementation.

Required Associated Constants§

Source

const KIND: &'static str

The type on the wire (one of kinds).

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl ServerPush for ChatMessage

Source§

const KIND: &'static str = kinds::CHAT_MESSAGE

Source§

impl ServerPush for MessageDeleted

Source§

const KIND: &'static str = kinds::CHAT_DELETED

Source§

impl ServerPush for Presence

Source§

const KIND: &'static str = kinds::CHAT_PRESENCE