pub trait ReadVolatile {
// Required method
fn read_volatile<B: BitmapSlice>(
&mut self,
buf: &mut VolatileSlice<'_, B>,
) -> Result<usize, VolatileMemoryError>;
// Provided method
fn read_exact_volatile<B: BitmapSlice>(
&mut self,
buf: &mut VolatileSlice<'_, B>,
) -> Result<(), VolatileMemoryError> { ... }
}
Expand description
Required Methods§
Sourcefn read_volatile<B: BitmapSlice>(
&mut self,
buf: &mut VolatileSlice<'_, B>,
) -> Result<usize, VolatileMemoryError>
fn read_volatile<B: BitmapSlice>( &mut self, buf: &mut VolatileSlice<'_, B>, ) -> Result<usize, VolatileMemoryError>
Tries to read some bytes into the given VolatileSlice
buffer, returning how many bytes
were read.
The behavior of implementations should be identical to Read::read
Provided Methods§
Sourcefn read_exact_volatile<B: BitmapSlice>(
&mut self,
buf: &mut VolatileSlice<'_, B>,
) -> Result<(), VolatileMemoryError>
fn read_exact_volatile<B: BitmapSlice>( &mut self, buf: &mut VolatileSlice<'_, B>, ) -> Result<(), VolatileMemoryError>
Tries to fill the given VolatileSlice
buffer by reading from self
returning an error
if insufficient bytes could be read.
The default implementation is identical to that of Read::read_exact
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.