PointerLike

Trait PointerLike 

Source
pub trait PointerLike<T>: Sized
where T: PointerTarget<T>,
{ type Pointer<A: PointerTarget<A>>: PointerLike<A>; // Required methods fn as_instance_of<B: PointerTarget<B>>(&self) -> Self::Pointer<B>; fn address(&self) -> Option<Address>; fn is_valid(&self) -> bool; // Provided method fn is_invalid(&self) -> bool { ... } }

Required Associated Types§

Required Methods§

Source

fn as_instance_of<B: PointerTarget<B>>(&self) -> Self::Pointer<B>

Source

fn address(&self) -> Option<Address>

Source

fn is_valid(&self) -> bool

Provided Methods§

Source

fn is_invalid(&self) -> bool

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.

Implementors§

Source§

impl<T> PointerLike<T> for Pointer<T>
where T: PointerTarget<T>,