Trait taos_query::util::AsyncInlinableRead
source · pub trait AsyncInlinableRead: AsyncRead + Unpin + Send {
// Provided methods
fn read_len_with_width<'life0, 'async_trait, const N: usize>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn read_len_with_data<'life0, 'async_trait, const N: usize>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn read_inlined_bytes<'life0, 'async_trait, const N: usize>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn read_inlined_str<'life0, 'async_trait, const N: usize>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn read_inlinable<'life0, 'async_trait, T>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<T>> + Send + 'async_trait>>
where T: Sized + 'async_trait + AsyncInlinable,
Self: 'async_trait,
'life0: 'async_trait { ... }
}Provided Methods§
sourcefn read_len_with_width<'life0, 'async_trait, const N: usize>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn read_len_with_width<'life0, 'async_trait, const N: usize>( &'life0 mut self ) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Read N bytes as usize.
Only 1/2/4/8 is valid as N.
sourcefn read_len_with_data<'life0, 'async_trait, const N: usize>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn read_len_with_data<'life0, 'async_trait, const N: usize>( &'life0 mut self ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Read a bytes len with width N and the next len - N bytes into a Vec。
The bytes contains:
+--------------+-----------------+
| len: N bytes | data: len - N bytes |
+--------------+-----------------+
sourcefn read_inlined_bytes<'life0, 'async_trait, const N: usize>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn read_inlined_bytes<'life0, 'async_trait, const N: usize>( &'life0 mut self ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Read inlined bytes with specific length width N.
The inlined bytes are constructed as:
+--------------+-----------------+
| len: N bytes | data: len bytes |
+--------------+-----------------+
sourcefn read_inlined_str<'life0, 'async_trait, const N: usize>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn read_inlined_str<'life0, 'async_trait, const N: usize>( &'life0 mut self ) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Read inlined string with specific length width N.
The inlined string are constructed as:
+--------------+-----------------+
| len: N bytes | data: len bytes |
+--------------+-----------------+
sourcefn read_inlinable<'life0, 'async_trait, T>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<T>> + Send + 'async_trait>>where
T: Sized + 'async_trait + AsyncInlinable,
Self: 'async_trait,
'life0: 'async_trait,
fn read_inlinable<'life0, 'async_trait, T>( &'life0 mut self ) -> Pin<Box<dyn Future<Output = Result<T>> + Send + 'async_trait>>where T: Sized + 'async_trait + AsyncInlinable, Self: 'async_trait, 'life0: 'async_trait,
Read some bytes into inlinable object.