pub trait StreamReadHelpers:
AsyncRead
+ Send
+ Unpin {
// Provided methods
fn read_int16<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<i16, SteamError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn read_uint16<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<u16, SteamError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn read_int32<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<i32, SteamError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn read_int64<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<i64, SteamError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn read_uint32<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<u32, SteamError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn read_uint64<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<u64, SteamError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn read_float<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<f32, SteamError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn read_null_term_string<'life0, 'async_trait>(
&'life0 mut self,
encoding: StreamEncoding,
) -> Pin<Box<dyn Future<Output = Result<String, SteamError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn read_all<'life0, 'life1, 'async_trait>(
&'life0 mut self,
buffer: &'life1 mut [u8],
) -> Pin<Box<dyn Future<Output = Result<usize, SteamError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
}Expand description
Async read helpers.
Provided Methods§
Sourcefn read_int16<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<i16, SteamError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn read_int16<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<i16, SteamError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Reads a little endian 16 bit signed integer.
Sourcefn read_uint16<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<u16, SteamError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn read_uint16<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<u16, SteamError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Reads a little endian 16 bit unsigned integer.
Sourcefn read_int32<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<i32, SteamError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn read_int32<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<i32, SteamError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Reads a little endian 32 bit signed integer.
Sourcefn read_int64<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<i64, SteamError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn read_int64<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<i64, SteamError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Reads a little endian 64 bit signed integer.
Sourcefn read_uint32<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<u32, SteamError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn read_uint32<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<u32, SteamError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Reads a little endian 32 bit unsigned integer.
Sourcefn read_uint64<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<u64, SteamError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn read_uint64<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<u64, SteamError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Reads a little endian 64 bit unsigned integer.
Sourcefn read_float<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<f32, SteamError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn read_float<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<f32, SteamError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Reads a little endian 32 bit floating point number.
Sourcefn read_null_term_string<'life0, 'async_trait>(
&'life0 mut self,
encoding: StreamEncoding,
) -> Pin<Box<dyn Future<Output = Result<String, SteamError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn read_null_term_string<'life0, 'async_trait>(
&'life0 mut self,
encoding: StreamEncoding,
) -> Pin<Box<dyn Future<Output = Result<String, SteamError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Reads a null-terminated string in the given encoding, stopping at the terminator (which isn’t included) or the end of the stream.
Sourcefn read_all<'life0, 'life1, 'async_trait>(
&'life0 mut self,
buffer: &'life1 mut [u8],
) -> Pin<Box<dyn Future<Output = Result<usize, SteamError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn read_all<'life0, 'life1, 'async_trait>(
&'life0 mut self,
buffer: &'life1 mut [u8],
) -> Pin<Box<dyn Future<Output = Result<usize, SteamError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Reads until buffer is full or the stream ends, and returns how many
bytes were read.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".