pub trait AsyncRemoteSource:
Send
+ Sync
+ 'static {
// Required methods
fn fetch(
&self,
) -> Pin<Box<dyn Future<Output = Result<Fetched, Error>> + Send + '_>>;
fn describe(&self) -> String;
}Available on crate feature
async only.Expand description
A remote store that is read asynchronously.
The right trait for a client that is async to begin with — etcd speaks gRPC
and NATS is a streaming protocol, so both are. Used through
refresh_remote_async().await.
The lifetime-bound boxed future rather than async fn: this trait is
object-safe on purpose, so a configuration type can hold one without being
generic over it.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".