pub trait Handler: Send {
type Reader: AsyncRead + Unpin + Send + 'static;
type Writer: AsyncWrite + Unpin + Send + 'static;
// Required methods
fn read_req_open(
&mut self,
client: &SocketAddr,
path: &Path,
) -> impl Future<Output = Result<(Self::Reader, Option<u64>), Error>> + Send;
fn write_req_open(
&mut self,
client: &SocketAddr,
path: &Path,
size: Option<u64>,
) -> impl Future<Output = Result<Self::Writer, Error>> + Send;
}Expand description
Trait for implementing advance handlers.
Required Associated Types§
type Reader: AsyncRead + Unpin + Send + 'static
type Writer: AsyncWrite + Unpin + Send + 'static
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.