#[repr(C)]pub struct TypeOpsIndirect {
pub drop_in_place: unsafe fn(OxPtrMut),
pub default_in_place: Option<unsafe fn(OxPtrMut)>,
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(OxPtrMut)>Construct a default value in place.
Returns None if the type doesn’t implement 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
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TypeOpsIndirect
impl Debug for TypeOpsIndirect
Source§impl From<&'static TypeOpsIndirect> for TypeOps
impl From<&'static TypeOpsIndirect> for TypeOps
Source§fn from(ops: &'static TypeOpsIndirect) -> Self
fn from(ops: &'static TypeOpsIndirect) -> Self
Converts to this type from the input type.
impl Copy for TypeOpsIndirect
Auto Trait Implementations§
impl Freeze for TypeOpsIndirect
impl RefUnwindSafe for TypeOpsIndirect
impl Send for TypeOpsIndirect
impl Sync for TypeOpsIndirect
impl Unpin for TypeOpsIndirect
impl UnwindSafe for TypeOpsIndirect
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more