pub trait VmPtr: Copy {
type Target;
// Provided methods
fn nullable(self) -> Option<Self> { ... }
fn vm_read_uninit(self) -> VmResult<MaybeUninit<Self::Target>> { ... }
fn vm_read(self) -> VmResult<Self::Target>
where Self::Target: AnyBitPattern { ... }
}Expand description
A virtual memory pointer.
Required Associated Types§
Provided Methods§
Sourcefn nullable(self) -> Option<Self>
fn nullable(self) -> Option<Self>
Returns None if the pointer is null, otherwise returns Some(self).
Sourcefn vm_read_uninit(self) -> VmResult<MaybeUninit<Self::Target>>
fn vm_read_uninit(self) -> VmResult<MaybeUninit<Self::Target>>
Reads the value from this virtual memory pointer. In contrast to
VmPtr::vm_read, this does not require that the value has to be
initialized.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.