miri::shims::files

Trait EvalContextExt

Source
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§

Source

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.

Source

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

Implementors§

Source§

impl<'tcx> EvalContextExt<'tcx> for MiriInterpCx<'tcx>