pub trait ReadonlyConnection {
// Required methods
fn on_notification<T: ServiceMethodRequest>(
&self,
) -> impl Stream<Item = Result<T, NetworkError>> + 'static;
fn one_with_header<T: NetMessage + 'static>(
&self,
) -> impl Future<Output = Result<(NetMessageHeader, T), NetworkError>> + 'static;
fn one<T: NetMessage + 'static>(
&self,
) -> impl Future<Output = Result<T, NetworkError>> + 'static;
fn on_with_header<T: NetMessage + 'static>(
&self,
) -> impl Stream<Item = Result<(NetMessageHeader, T), NetworkError>> + 'static;
fn on<T: NetMessage + 'static>(
&self,
) -> impl Stream<Item = Result<T, NetworkError>> + 'static;
}Expand description
A trait for connections that only allow listening for messages coming from steam
Required Methods§
fn on_notification<T: ServiceMethodRequest>( &self, ) -> impl Stream<Item = Result<T, NetworkError>> + 'static
Sourcefn one_with_header<T: NetMessage + 'static>(
&self,
) -> impl Future<Output = Result<(NetMessageHeader, T), NetworkError>> + 'static
fn one_with_header<T: NetMessage + 'static>( &self, ) -> impl Future<Output = Result<(NetMessageHeader, T), NetworkError>> + 'static
Wait for one message of a specific kind, also returning the header
Sourcefn one<T: NetMessage + 'static>(
&self,
) -> impl Future<Output = Result<T, NetworkError>> + 'static
fn one<T: NetMessage + 'static>( &self, ) -> impl Future<Output = Result<T, NetworkError>> + 'static
Wait for one message of a specific kind
Sourcefn on_with_header<T: NetMessage + 'static>(
&self,
) -> impl Stream<Item = Result<(NetMessageHeader, T), NetworkError>> + 'static
fn on_with_header<T: NetMessage + 'static>( &self, ) -> impl Stream<Item = Result<(NetMessageHeader, T), NetworkError>> + 'static
Listen to messages of a specific kind, also returning the header
Sourcefn on<T: NetMessage + 'static>(
&self,
) -> impl Stream<Item = Result<T, NetworkError>> + 'static
fn on<T: NetMessage + 'static>( &self, ) -> impl Stream<Item = Result<T, NetworkError>> + 'static
Listen to messages of a specific kind
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.
Implementors§
impl ReadonlyConnection for UnAuthenticatedConnection
Listen for messages before starting authentication