FromResponseStreamEvent

Trait FromResponseStreamEvent 

Source
pub trait FromResponseStreamEvent<State: Clone + Send + Sync + 'static>: Sized {
    // Required method
    fn from_stream_event(
        event: &mut ResponseStreamEvent<State>,
    ) -> impl Future<Output = Result<Self, CatBridgeError>> + Send;
}
Available on (crate features clients or servers) and crate feature servers only.
Expand description

Extract any value from a Connection event.

Mirrors crate::net::models::FromRequest.

Required Methods§

Source

fn from_stream_event( event: &mut ResponseStreamEvent<State>, ) -> impl Future<Output = Result<Self, CatBridgeError>> + Send

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<OuterState: Clone + Send + Sync + 'static, InnerState: FromRef<OuterState> + Clone + Send + Sync + 'static> FromResponseStreamEvent<OuterState> for State<InnerState>

Source§

impl<Ty, State: Clone + Send + Sync + 'static> FromResponseStreamEvent<State> for Extension<Ty>
where Ty: Clone + Send + Sync + 'static,