pub trait EvalContextExt<'tcx>: MiriInterpCxExt<'tcx> {
// Provided methods
fn return_read_success(
&mut self,
buf: Pointer,
bytes: &[u8],
actual_read_size: usize,
dest: &MPlaceTy<'tcx>,
) -> InterpResult<'tcx> { ... }
fn return_write_success(
&mut self,
actual_write_size: usize,
dest: &MPlaceTy<'tcx>,
) -> InterpResult<'tcx> { ... }
}
Provided Methods§
Sourcefn return_read_success(
&mut self,
buf: Pointer,
bytes: &[u8],
actual_read_size: usize,
dest: &MPlaceTy<'tcx>,
) -> InterpResult<'tcx>
fn return_read_success( &mut self, buf: Pointer, bytes: &[u8], actual_read_size: usize, dest: &MPlaceTy<'tcx>, ) -> InterpResult<'tcx>
Helper to implement FileDescription::read
:
This is only used when read
is successful.
actual_read_size
should be the return value of some underlying read
call that used
bytes
as its output buffer.
The length of bytes
must not exceed either the host’s or the target’s isize
.
bytes
is written to buf
and the size is written to dest
.
Sourcefn return_write_success(
&mut self,
actual_write_size: usize,
dest: &MPlaceTy<'tcx>,
) -> InterpResult<'tcx>
fn return_write_success( &mut self, actual_write_size: usize, dest: &MPlaceTy<'tcx>, ) -> InterpResult<'tcx>
Helper to implement FileDescription::write
:
This function is only used when write
is successful, and writes actual_write_size
to dest