Trait dioxus_fullstack::prelude::FromServerContext

source ·
pub trait FromServerContext<I = ()>: Sized {
    type Rejection: Error;

    // Required method
    fn from_request<'life0, 'async_trait>(
        req: &'life0 DioxusServerContext,
    ) -> Pin<Box<dyn Future<Output = Result<Self, Self::Rejection>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Available on crate feature server only.
Expand description

A trait for extracting types from the server context

Required Associated Types§

source

type Rejection: Error

The error type returned when extraction fails. This type must implement std::error::Error.

Required Methods§

source

fn from_request<'life0, 'async_trait>( req: &'life0 DioxusServerContext, ) -> Pin<Box<dyn Future<Output = Result<Self, Self::Rejection>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Extract this type from the server context.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<I: FromRequestParts<(), Rejection = R>, R: IntoResponse + Error> FromServerContext<Axum> for I

§

type Rejection = R

source§

impl<T: Send + Sync + Clone + 'static> FromServerContext for FromContext<T>

§

type Rejection = NotFoundInServerContext<T>