Trait websocket::ws::Message[][src]

pub trait Message {
    pub fn serialize(
        &self,
        &mut dyn Write,
        masked: bool
    ) -> Result<(), WebSocketError>;
pub fn message_size(&self, masked: bool) -> usize;
pub fn from_dataframes<D>(
        frames: Vec<D, Global>
    ) -> Result<Self, WebSocketError>
    where
        D: DataFrame
; }

A trait for WebSocket messages

Required methods

pub fn serialize(
    &self,
    &mut dyn Write,
    masked: bool
) -> Result<(), WebSocketError>
[src]

Writes this message to the writer

pub fn message_size(&self, masked: bool) -> usize[src]

Returns how many bytes this message will take up

pub fn from_dataframes<D>(
    frames: Vec<D, Global>
) -> Result<Self, WebSocketError> where
    D: DataFrame
[src]

Attempt to form a message from a series of data frames

Loading content...

Implementors

impl Message for OwnedMessage[src]

pub fn serialize(
    &self,
    writer: &mut dyn Write,
    masked: bool
) -> Result<(), WebSocketError>
[src]

Attempt to form a message from a series of data frames

pub fn message_size(&self, masked: bool) -> usize[src]

Returns how many bytes this message will take up

pub fn from_dataframes<D>(
    frames: Vec<D, Global>
) -> Result<OwnedMessage, WebSocketError> where
    D: DataFrame
[src]

Attempt to form a message from a series of data frames

impl<'a> Message for Message<'a>[src]

pub fn serialize(
    &self,
    writer: &mut dyn Write,
    masked: bool
) -> Result<(), WebSocketError>
[src]

Attempt to form a message from a series of data frames

pub fn message_size(&self, masked: bool) -> usize[src]

Returns how many bytes this message will take up

pub fn from_dataframes<D>(
    frames: Vec<D, Global>
) -> Result<Message<'a>, WebSocketError> where
    D: DataFrame
[src]

Attempt to form a message from a series of data frames

Loading content...