pub trait Read<'a> {
// Required methods
fn read_byte<'life0, 'async_trait>(
&'life0 mut self,
from_offset: usize,
) -> Pin<Box<dyn Future<Output = Result<u8>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn read_bytes<'life0, 'async_trait>(
&'life0 mut self,
from_offset: usize,
to_offset: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn read_u16_from_be<'life0, 'async_trait>(
&'life0 mut self,
offset: usize,
) -> Pin<Box<dyn Future<Output = Result<u16>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn buffer_to<'life0, 'async_trait>(
&'life0 mut self,
limit: usize,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Required Methods§
Sourcefn read_byte<'life0, 'async_trait>(
&'life0 mut self,
from_offset: usize,
) -> Pin<Box<dyn Future<Output = Result<u8>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn read_byte<'life0, 'async_trait>(
&'life0 mut self,
from_offset: usize,
) -> Pin<Box<dyn Future<Output = Result<u8>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Peeks or reads byte.
Sourcefn read_bytes<'life0, 'async_trait>(
&'life0 mut self,
from_offset: usize,
to_offset: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn read_bytes<'life0, 'async_trait>(
&'life0 mut self,
from_offset: usize,
to_offset: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Peeks or reads u16 from big endian.