pub trait FallibleVmWrite<F> {
// Required method
fn write_fallible(
&mut self,
reader: &mut VmReader<'_, F>,
) -> Result<usize, (Error, usize)>;
}Expand description
Fallible memory write from a VmReader.
Required Methods§
Sourcefn write_fallible(
&mut self,
reader: &mut VmReader<'_, F>,
) -> Result<usize, (Error, usize)>
fn write_fallible( &mut self, reader: &mut VmReader<'_, F>, ) -> Result<usize, (Error, usize)>
Writes all data from the reader until one of the three conditions is met:
- The reader has no remaining data.
- The writer has no available space.
- The reader/writer encounters some error.
On success, the number of bytes written is returned; On error, both the error and the number of bytes written so far are returned.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".