[−][src]Struct cometd::packet::Packet
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]
self,
supported_connection_types: Vec<ConnectionType>
) -> Self
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]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,