pub trait DataSource<K: ?Sized>: Send + Sync {
type Err: Send;
type Reader: AsyncRead + Unpin + Send;
// Required method
fn get<Q: ?Sized + Sync + AsRef<K>>(
&self,
k: &Q,
) -> impl Send + Future<Output = Result<Self::Reader, Self::Err>>;
}Required Associated Types§
Required Methods§
fn get<Q: ?Sized + Sync + AsRef<K>>( &self, k: &Q, ) -> impl Send + Future<Output = Result<Self::Reader, Self::Err>>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".