pub struct Codec { /* private fields */ }
Expand description
WebSocket protocol codec.
Implementations§
Source§impl Codec
impl Codec
Sourcepub fn set_max_size(self, size: usize) -> Self
pub fn set_max_size(self, size: usize) -> Self
Set max frame size.
By default max size is set to 64kB.
pub const fn max_size(&self) -> usize
Sourcepub fn set_capacity(self, size: usize) -> Self
pub fn set_capacity(self, size: usize) -> Self
Set capacity for concurrent buffered outgoing message.
By default capacity is set to 128.
pub const fn capacity(&self) -> usize
Sourcepub fn client_mode(self) -> Self
pub fn client_mode(self) -> Self
Set decoder to client mode.
By default decoder works in server mode.
Trait Implementations§
impl Copy for Codec
Auto Trait Implementations§
impl Freeze for Codec
impl RefUnwindSafe for Codec
impl Send for Codec
impl Sync for Codec
impl Unpin for Codec
impl UnwindSafe for Codec
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more