[][src]Struct cometd::packet::Packet

pub struct Packet {
    pub advice: Option<Advice>,
    pub channel: Channel,
    pub client_id: Option<String>,
    pub connection_type: Option<ConnectionType>,
    pub data: Option<Value>,
    pub error: Option<String>,
    pub ext: Option<Value>,
    pub id: Option<String>,
    pub minimum_version: Option<String>,
    pub subscription: Option<Channel>,
    pub successful: Option<bool>,
    pub supported_connection_types: Option<Vec<ConnectionType>>,
    pub version: Option<String>,
    pub extra: HashMap<String, Value>,
}

A Cometd data packet

Fields

advice: Option<Advice>channel: Channel

The channel this is sent on

client_id: Option<String>connection_type: Option<ConnectionType>data: Option<Value>error: Option<String>ext: Option<Value>id: Option<String>minimum_version: Option<String>subscription: Option<Channel>successful: Option<bool>supported_connection_types: Option<Vec<ConnectionType>>version: Option<String>extra: HashMap<String, Value>

Extra fields in the json packet

Implementations

impl Packet[src]

pub fn new() -> Self[src]

pub fn advice(self, advice: Advice) -> Self[src]

pub fn channel(self, channel: Channel) -> Self[src]

pub fn client_id(self, id: String) -> Self[src]

pub fn connection_type(self, connection_type: ConnectionType) -> Self[src]

pub fn data(self, data: Value) -> Self[src]

pub fn version(self, version: String) -> Self[src]

pub fn minimum_version(self, minimum_version: String) -> Self[src]

pub fn supported_connection_types(
    self,
    supported_connection_types: Vec<ConnectionType>
) -> Self
[src]

pub fn ext(self, ext: Value) -> Self[src]

pub fn subscription(self, channel: Channel) -> Self[src]

Trait Implementations

impl Clone for Packet[src]

impl Debug for Packet[src]

impl Default for Packet[src]

impl<'de> Deserialize<'de> for Packet[src]

impl Serialize for Packet[src]

Auto Trait Implementations

impl RefUnwindSafe for Packet

impl Send for Packet

impl Sync for Packet

impl Unpin for Packet

impl UnwindSafe for Packet

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,