#[repr(C)]pub struct TypeOpsIndirect {
pub drop_in_place: unsafe fn(OxPtrMut),
pub default_in_place: Option<unsafe fn(OxPtrUninit) -> bool>,
pub clone_into: Option<unsafe fn(src: OxPtrConst, dst: OxPtrMut)>,
pub is_truthy: Option<TruthyFn>,
}Expand description
Type-specific operations for generic containers (uses wide pointers with shape).
Used for Vec<T>, Option<T>, Arc<T>, etc.
These operations must be monomorphized per-type because they need to know
the concrete type T at compile time.
Fields§
§drop_in_place: unsafe fn(OxPtrMut)Drop the value in place.
§Safety
The pointer must point to a valid, initialized value of the correct type.
default_in_place: Option<unsafe fn(OxPtrUninit) -> bool>Construct a default value in place.
The outer Option is None if the type doesn’t implement Default.
The function returns true on success, false if initialization failed
(e.g., for arrays where an element type doesn’t support Default).
§Safety
The pointer must point to uninitialized memory of sufficient size and alignment.
clone_into: Option<unsafe fn(src: OxPtrConst, dst: OxPtrMut)>Clone a value into uninitialized memory.
Returns None if the type doesn’t implement Clone.
§Safety
srcmust point to a valid, initialized valuedstmust point to uninitialized memory of sufficient size and alignment
is_truthy: Option<TruthyFn>Truthiness predicate for this type. When absent, the type is never considered truthy.
Trait Implementations§
Source§impl Clone for TypeOpsIndirect
impl Clone for TypeOpsIndirect
Source§fn clone(&self) -> TypeOpsIndirect
fn clone(&self) -> TypeOpsIndirect
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more