pub trait EvalContextExt<'mir, 'tcx: 'mir>: MiriInterpCxExt<'mir, 'tcx> {
// Provided methods
fn fcntl(
&mut self,
args: &[OpTy<'tcx, Provenance>]
) -> InterpResult<'tcx, i32> { ... }
fn close(
&mut self,
fd_op: &OpTy<'tcx, Provenance>
) -> InterpResult<'tcx, Scalar<Provenance>> { ... }
fn fd_not_found<T: From<i32>>(&mut self) -> InterpResult<'tcx, T> { ... }
fn read(
&mut self,
fd: i32,
buf: Pointer<Option<Provenance>>,
count: u64
) -> InterpResult<'tcx, i64> { ... }
fn write(
&mut self,
fd: i32,
buf: Pointer<Option<Provenance>>,
count: u64
) -> InterpResult<'tcx, i64> { ... }
}
Provided Methods§
fn fcntl(&mut self, args: &[OpTy<'tcx, Provenance>]) -> InterpResult<'tcx, i32>
fn close( &mut self, fd_op: &OpTy<'tcx, Provenance> ) -> InterpResult<'tcx, Scalar<Provenance>>
sourcefn fd_not_found<T: From<i32>>(&mut self) -> InterpResult<'tcx, T>
fn fd_not_found<T: From<i32>>(&mut self) -> InterpResult<'tcx, T>
Function used when a file descriptor does not exist. It returns Ok(-1)
and sets
the last OS error to libc::EBADF
(invalid file descriptor). This function uses
T: From<i32>
instead of i32
directly because some fs functions return different integer
types (like read
, that returns an i64
).
fn read( &mut self, fd: i32, buf: Pointer<Option<Provenance>>, count: u64 ) -> InterpResult<'tcx, i64>
fn write( &mut self, fd: i32, buf: Pointer<Option<Provenance>>, count: u64 ) -> InterpResult<'tcx, i64>
Object Safety§
This trait is not object safe.