pub trait RelayExt: Relay {
// Required methods
fn broadcast_with_timeout<'life0, 'life1, 'life2, 'async_trait, T>(
&'life0 self,
session_id: &'life1 SessionId,
round: u32,
message: &'life2 T,
timeout: Duration,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where T: 'async_trait + Serialize + Send + Sync,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn collect_broadcasts_with_timeout<'life0, 'life1, 'async_trait, T>(
&'life0 self,
session_id: &'life1 SessionId,
round: u32,
count: usize,
timeout: Duration,
) -> Pin<Box<dyn Future<Output = Result<Vec<T>>> + Send + 'async_trait>>
where T: 'async_trait + DeserializeOwned + Send,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Extension trait for relay with timeout support
Required Methods§
Sourcefn broadcast_with_timeout<'life0, 'life1, 'life2, 'async_trait, T>(
&'life0 self,
session_id: &'life1 SessionId,
round: u32,
message: &'life2 T,
timeout: Duration,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
fn broadcast_with_timeout<'life0, 'life1, 'life2, 'async_trait, T>( &'life0 self, session_id: &'life1 SessionId, round: u32, message: &'life2 T, timeout: Duration, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
Broadcast with timeout
Sourcefn collect_broadcasts_with_timeout<'life0, 'life1, 'async_trait, T>(
&'life0 self,
session_id: &'life1 SessionId,
round: u32,
count: usize,
timeout: Duration,
) -> Pin<Box<dyn Future<Output = Result<Vec<T>>> + Send + 'async_trait>>where
T: 'async_trait + DeserializeOwned + Send,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn collect_broadcasts_with_timeout<'life0, 'life1, 'async_trait, T>(
&'life0 self,
session_id: &'life1 SessionId,
round: u32,
count: usize,
timeout: Duration,
) -> Pin<Box<dyn Future<Output = Result<Vec<T>>> + Send + 'async_trait>>where
T: 'async_trait + DeserializeOwned + Send,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Collect broadcasts with timeout
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.