[][src]Struct warp::filters::ws::Ws

pub struct Ws { /* fields omitted */ }

Extracted by the ws filter, and used to finish an upgrade.

Methods

impl Ws[src]

pub fn on_upgrade<F, U>(self, func: F) -> impl Reply where
    F: FnOnce(WebSocket) -> U + Send + 'static,
    U: Future<Output = ()> + Send + 'static, 
[src]

Finish the upgrade, passing a function to handle the WebSocket.

The passed function must return a Future.

pub fn max_send_queue(self, max: usize) -> Self[src]

Set the size of the internal message send queue.

pub fn max_message_size(self, max: usize) -> Self[src]

Set the maximum message size (defaults to 64 megabytes)

Trait Implementations

impl Debug for Ws[src]

Auto Trait Implementations

impl !RefUnwindSafe for Ws

impl Send for Ws

impl Sync for Ws

impl Unpin for Ws

impl !UnwindSafe for Ws

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,