pub trait TryFromConn:
Send
+ Sync
+ Sized
+ 'static {
type Error: Send + Sync + Sized + 'static;
// Required method
fn try_from_conn(
conn: &mut Conn,
) -> impl Future<Output = Result<Self, Self::Error>> + Send;
}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§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl TryFromConn for String
impl TryFromConn for String
Source§impl TryFromConn for Url
Available on crate feature url only.
impl TryFromConn for Url
Available on crate feature
url only.