pub trait WriteVolatile {
// Required method
fn write_volatile<B: BitmapSlice>(
&mut self,
buf: &VolatileSlice<'_, B>,
) -> Result<usize, VolatileMemoryError>;
// Provided method
fn write_all_volatile<B: BitmapSlice>(
&mut self,
buf: &VolatileSlice<'_, B>,
) -> Result<(), VolatileMemoryError> { ... }
}
Expand description
Required Methods§
Sourcefn write_volatile<B: BitmapSlice>(
&mut self,
buf: &VolatileSlice<'_, B>,
) -> Result<usize, VolatileMemoryError>
fn write_volatile<B: BitmapSlice>( &mut self, buf: &VolatileSlice<'_, B>, ) -> Result<usize, VolatileMemoryError>
Tries to write some bytes from the given VolatileSlice
buffer, returning how many bytes
were written.
The behavior of implementations should be identical to Write::write
Provided Methods§
Sourcefn write_all_volatile<B: BitmapSlice>(
&mut self,
buf: &VolatileSlice<'_, B>,
) -> Result<(), VolatileMemoryError>
fn write_all_volatile<B: BitmapSlice>( &mut self, buf: &VolatileSlice<'_, B>, ) -> Result<(), VolatileMemoryError>
Tries write the entire content of the given VolatileSlice
buffer to self
returning an
error if not all bytes could be written.
The default implementation is identical to that of Write::write_all
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.