pub trait FromServerContext<I = ()>: Sized {
type Rejection;
// 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§
Required Methods§
Sourcefn 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,
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.
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.