Struct poem::web::websocket::WebSocketUpgraded
source · pub struct WebSocketUpgraded<F> { /* private fields */ }
Available on crate feature
websocket
only.Expand description
A response returned from WebSocket::on_upgrade
.
Implementations
sourceimpl<F, Fut> WebSocketUpgraded<F>where
F: FnOnce(WebSocketStream) -> Fut + Send + Sync + 'static,
Fut: Future + Send + 'static,
impl<F, Fut> WebSocketUpgraded<F>where
F: FnOnce(WebSocketStream) -> Fut + Send + Sync + 'static,
Fut: Future + Send + 'static,
sourcepub fn boxed(self) -> BoxWebSocketUpgraded
pub fn boxed(self) -> BoxWebSocketUpgraded
Create an owned dynamically typed WebSocketUpgraded
Trait Implementations
sourceimpl<F, Fut> IntoResponse for WebSocketUpgraded<F>where
F: FnOnce(WebSocketStream) -> Fut + Send + Sync + 'static,
Fut: Future + Send + 'static,
impl<F, Fut> IntoResponse for WebSocketUpgraded<F>where
F: FnOnce(WebSocketStream) -> Fut + Send + Sync + 'static,
Fut: Future + Send + 'static,
sourcefn into_response(self) -> Response
fn into_response(self) -> Response
Consume itself and return
Response
.sourcefn with_header<K, V>(self, key: K, value: V) -> WithHeader<Self>where
K: TryInto<HeaderName>,
V: TryInto<HeaderValue>,
Self: Sized,
fn with_header<K, V>(self, key: K, value: V) -> WithHeader<Self>where
K: TryInto<HeaderName>,
V: TryInto<HeaderValue>,
Self: Sized,
Wrap an
impl IntoResponse
to add a header. Read moresourcefn with_content_type<V>(self, content_type: V) -> WithContentType<Self>where
V: TryInto<HeaderValue>,
Self: Sized,
fn with_content_type<V>(self, content_type: V) -> WithContentType<Self>where
V: TryInto<HeaderValue>,
Self: Sized,
Wrap an
impl IntoResponse
to with a new content type. Read moresourcefn with_status(self, status: StatusCode) -> WithStatus<Self>where
Self: Sized,
fn with_status(self, status: StatusCode) -> WithStatus<Self>where
Self: Sized,
Wrap an
impl IntoResponse
to set a status code. Read moreAuto Trait Implementations
impl<F> !RefUnwindSafe for WebSocketUpgraded<F>
impl<F> Send for WebSocketUpgraded<F>where
F: Send,
impl<F> Sync for WebSocketUpgraded<F>where
F: Sync,
impl<F> Unpin for WebSocketUpgraded<F>where
F: Unpin,
impl<F> !UnwindSafe for WebSocketUpgraded<F>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> FutureExt for T
impl<T> FutureExt for T
fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> IntoResult<T> for Twhere
T: IntoResponse,
impl<T> IntoResult<T> for Twhere
T: IntoResponse,
sourcefn into_result(self) -> Result<T, Error>
fn into_result(self) -> Result<T, Error>
Consumes this value returns a
poem::Result<T>
.