Trait trillium_api::TryFromConn
source · pub trait TryFromConn: Send + Sync + Sized + 'static {
type Error: Send + Sync + Sized + 'static;
// Required method
fn try_from_conn<'life0, 'async_trait>(
conn: &'life0 mut Conn
) -> Pin<Box<dyn Future<Output = Result<Self, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Expand description
Like FromConn, but with an Error.
If you want to use this directly, Error needs to be Handler.
If Error is not Handler, you can use Result<T, E> as TryFromConn where T: TryFromConn<Error = E>
If extraction is infallible, implement FromConn
.
Required Associated Types§
Required Methods§
Object Safety§
This trait is not object safe.