FromRequestParts

Trait FromRequestParts 

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

Extract any value from a Request, allowing more people to keep using it.

Kept as our own trait so it can be async like axum.

Required Methods§

Source

fn from_request_parts( req: &mut Request<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.

Implementations on Foreign Types§

Source§

impl<State: Clone + Send + Sync + 'static> FromRequestParts<State> for Option<WriteAheadLog>

Available on crate feature servers only.
Source§

async fn from_request_parts( parts: &mut Request<State>, ) -> Result<Self, CatBridgeError>

Available on crate features clients or servers only.

Implementors§

Source§

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

Available on crate feature servers only.
Source§

impl<State: Clone + Send + Sync + 'static> FromRequestParts<State> for SataConnectionFlags

Available on crate feature servers only.
Source§

impl<State: Clone + Send + Sync + 'static> FromRequestParts<State> for RequestID

Source§

impl<State: Clone + Send + Sync + 'static> FromRequestParts<State> for StreamID

Source§

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

Available on crate feature servers only.