Struct twist::server::BaseFrameCodec
[−]
[src]
pub struct BaseFrameCodec { /* fields omitted */ }
Codec for encoding/decoding websocket base frames.
Methods
impl FrameCodec
[src]
fn set_client(&mut self, client: bool) -> &mut FrameCodec
Set the client
flag.
fn set_reserved_bits(&mut self, reserved_bits: u8) -> &mut FrameCodec
Set the bits reserved by extensions (0-8 are valid values).
fn stdout(&mut self, logger: Logger) -> &mut FrameCodec
Add a stdout slog Logger
to this protocol.
fn stderr(&mut self, logger: Logger) -> &mut FrameCodec
Add a stderr slog Logger
to this protocol.
Trait Implementations
impl Clone for FrameCodec
[src]
fn clone(&self) -> FrameCodec
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Debug for FrameCodec
[src]
impl Default for FrameCodec
[src]
fn default() -> FrameCodec
Returns the "default value" for a type. Read more
impl Decoder for FrameCodec
[src]
type Item = Frame
The type of decoded frames.
type Error = Error
The type of unrecoverable frame decoding errors. Read more
fn decode(
&mut self,
buf: &mut BytesMut
) -> Result<Option<Self::Item>, Self::Error>
&mut self,
buf: &mut BytesMut
) -> Result<Option<Self::Item>, Self::Error>
Attempts to decode a frame from the provided buffer of bytes. Read more
fn decode_eof(
&mut self,
buf: &mut BytesMut
) -> Result<Option<Self::Item>, Self::Error>
&mut self,
buf: &mut BytesMut
) -> Result<Option<Self::Item>, Self::Error>
A default method available to be called when there are no more bytes available to be read from the underlying I/O. Read more