Trait websocket::ws::Message [−][src]
A trait for WebSocket messages
Required methods
pub fn serialize(
&self,
&mut dyn Write,
masked: bool
) -> Result<(), WebSocketError>
[src]
&self,
&mut dyn Write,
masked: bool
) -> Result<(), WebSocketError>
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]
frames: Vec<D, Global>
) -> Result<Self, WebSocketError> where
D: DataFrame,
Attempt to form a message from a series of data frames
Implementors
impl Message for OwnedMessage
[src]
pub fn serialize(
&self,
writer: &mut dyn Write,
masked: bool
) -> Result<(), WebSocketError>
[src]
&self,
writer: &mut dyn Write,
masked: bool
) -> Result<(), WebSocketError>
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]
frames: Vec<D, Global>
) -> Result<OwnedMessage, WebSocketError> where
D: DataFrame,
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]
&self,
writer: &mut dyn Write,
masked: bool
) -> Result<(), WebSocketError>
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]
frames: Vec<D, Global>
) -> Result<Message<'a>, WebSocketError> where
D: DataFrame,
Attempt to form a message from a series of data frames