pub trait EvalContextExt<'tcx>: MiriInterpCxExt<'tcx> {
// Provided methods
fn getaddrinfo(
&mut self,
node: &OpTy<'tcx>,
service: &OpTy<'tcx>,
hints: &OpTy<'tcx>,
res: &OpTy<'tcx>,
) -> InterpResult<'tcx, Scalar> { ... }
fn freeaddrinfo(&mut self, res: &OpTy<'tcx>) -> InterpResult<'tcx> { ... }
fn read_socklen(
&self,
op: &impl Projectable<'tcx, Provenance>,
) -> InterpResult<'tcx, Option<u64>> { ... }
fn read_socket_address(
&self,
address: &OpTy<'tcx>,
address_len: &OpTy<'tcx>,
foreign_name: &'static str,
) -> InterpResult<'tcx, Result<SocketAddr, IoError>> { ... }
fn write_socket_address(
&mut self,
address: Option<&SocketAddr>,
address_ptr: Pointer,
address_len_place: &MPlaceTy<'tcx>,
) -> InterpResult<'tcx> { ... }
}Provided Methods§
fn getaddrinfo( &mut self, node: &OpTy<'tcx>, service: &OpTy<'tcx>, hints: &OpTy<'tcx>, res: &OpTy<'tcx>, ) -> InterpResult<'tcx, Scalar>
fn freeaddrinfo(&mut self, res: &OpTy<'tcx>) -> InterpResult<'tcx>
Sourcefn read_socklen(
&self,
op: &impl Projectable<'tcx, Provenance>,
) -> InterpResult<'tcx, Option<u64>>
fn read_socklen( &self, op: &impl Projectable<'tcx, Provenance>, ) -> InterpResult<'tcx, Option<u64>>
Read a socklen_t value. Returns None if it does not fit into a u64, e.g. if it
is negative, which is possible on targets where socklen_t is signed.
Sourcefn read_socket_address(
&self,
address: &OpTy<'tcx>,
address_len: &OpTy<'tcx>,
foreign_name: &'static str,
) -> InterpResult<'tcx, Result<SocketAddr, IoError>>
fn read_socket_address( &self, address: &OpTy<'tcx>, address_len: &OpTy<'tcx>, foreign_name: &'static str, ) -> InterpResult<'tcx, Result<SocketAddr, IoError>>
Attempt to turn an address and length operand into a standard library socket address.
Returns an IO error should the address length not match the address family length.
Sourcefn write_socket_address(
&mut self,
address: Option<&SocketAddr>,
address_ptr: Pointer,
address_len_place: &MPlaceTy<'tcx>,
) -> InterpResult<'tcx>
fn write_socket_address( &mut self, address: Option<&SocketAddr>, address_ptr: Pointer, address_len_place: &MPlaceTy<'tcx>, ) -> InterpResult<'tcx>
Attempt to write a standard library socket address into a pointer.
The address_len_ptr parameter serves both as input and output parameter.
On input, it points to the size of the buffer address_ptr points to, and
on output it points to the non-truncated size of the written address in the
buffer pointed to by address_ptr.
If address is None we write an “empty” address (i.e., the address_len_ptr
is set to zero and the address_ptr is left untouched).
If address is Some, both output pointers must be valid!
If the address buffer doesn’t fit the whole address, the address is truncated to not overflow the buffer.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".