pub trait PointerLike<T>: Sizedwhere
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§
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 Methods§
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.