pub trait GatewayAsyncService {
type Instant;
// Required methods
fn from_uri(uri: &str) -> Self;
fn request<G>(&self, request: G) -> impl Future<Output = Result<G::Result>>
where G: GatewayRequest;
fn sleep(&self, millis: u64) -> impl Future<Output = ()>;
fn now(&self) -> Self::Instant;
fn elapsed_seconds(&self, instant: &Self::Instant) -> f32;
}
Required Associated Types§
Required Methods§
fn from_uri(uri: &str) -> Self
fn request<G>(&self, request: G) -> impl Future<Output = Result<G::Result>>where
G: GatewayRequest,
fn sleep(&self, millis: u64) -> impl Future<Output = ()>
fn now(&self) -> Self::Instant
fn elapsed_seconds(&self, instant: &Self::Instant) -> f32
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.