pub struct Ws { /* private fields */ }
Expand description
Extracted by the ws
filter, and used to finish an upgrade.
Implementations§
source§impl Ws
impl Ws
sourcepub fn on_upgrade<F, U>(self, func: F) -> impl Reply
pub fn on_upgrade<F, U>(self, func: F) -> impl Reply
Finish the upgrade, passing a function to handle the WebSocket
.
The passed function must return a Future
.
sourcepub fn max_send_queue(self, _max: usize) -> Self
👎Deprecated: use max_write_buffer_size instead
pub fn max_send_queue(self, _max: usize) -> Self
sourcepub fn max_write_buffer_size(self, max: usize) -> Self
pub fn max_write_buffer_size(self, max: usize) -> Self
The max size of the write buffer, in bytes.
sourcepub fn max_message_size(self, max: usize) -> Self
pub fn max_message_size(self, max: usize) -> Self
Set the maximum message size (defaults to 64 megabytes)
sourcepub fn max_frame_size(self, max: usize) -> Self
pub fn max_frame_size(self, max: usize) -> Self
Set the maximum frame size (defaults to 16 megabytes)
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Ws
impl !RefUnwindSafe for Ws
impl Send for Ws
impl Sync for Ws
impl Unpin for Ws
impl !UnwindSafe for Ws
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