pub trait Sender {
// Required method
fn is_masked(&self) -> bool;
// Provided methods
fn send_dataframe<D, W>(
&mut self,
writer: &mut W,
dataframe: &D
) -> Result<(), WebSocketError>
where D: DataFrame,
W: Write { ... }
fn send_message<M, W>(
&mut self,
writer: &mut W,
message: &M
) -> Result<(), WebSocketError>
where M: Message,
W: Write { ... }
}
Expand description
A trait for sending data frames and messages.
Required Methods§
Provided Methods§
sourcefn send_dataframe<D, W>(
&mut self,
writer: &mut W,
dataframe: &D
) -> Result<(), WebSocketError>
fn send_dataframe<D, W>( &mut self, writer: &mut W, dataframe: &D ) -> Result<(), WebSocketError>
Sends a single data frame using this sender.
sourcefn send_message<M, W>(
&mut self,
writer: &mut W,
message: &M
) -> Result<(), WebSocketError>
fn send_message<M, W>( &mut self, writer: &mut W, message: &M ) -> Result<(), WebSocketError>
Sends a single message using this sender.
Object Safety§
This trait is not object safe.