pub trait PointerExt<T> {
// Required methods
unsafe fn select(self, target_other: Self, target_predicate: bool) -> Self;
unsafe fn select_deref(
self,
target_other: Self,
target_predicate: bool,
) -> T;
}
Expand description
Extension trait for pointers.
Required Methods§
Sourceunsafe fn select(self, target_other: Self, target_predicate: bool) -> Self
unsafe fn select(self, target_other: Self, target_predicate: bool) -> Self
Selects between two pointers based on a predicate.
§Safety
Safety constrains are as per core::ptr::read
for both inputs.
Sourceunsafe fn select_deref(self, target_other: Self, target_predicate: bool) -> T
unsafe fn select_deref(self, target_other: Self, target_predicate: bool) -> T
Selects between two pointers and dereferences the selected pointer.
§Safety
Safety constrains are as per core::ptr::read
for both inputs.
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.