pub trait FromConn:
Send
+ Sync
+ Sized
+ 'static {
// Required method
fn from_conn<'life0, 'async_trait>(
conn: &'life0 mut Conn,
) -> Pin<Box<dyn Future<Output = Option<Self>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Expand description
A trait to extract content from [Conn
]s to be used as the second
argument to an api handler. Implement this for your types.
Required Methods§
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.