pub enum TypeOps {
Direct(&'static TypeOpsDirect),
Indirect(&'static TypeOpsIndirect),
}Expand description
Type-erased TypeOps that can hold either Direct or Indirect style.
| Variant | Use Case |
|---|---|
| Direct | Concrete types: scalars, String, derived types |
| Indirect | Generic containers: Vec<T>, Option<T>, Arc<T> |
Variants§
Direct(&'static TypeOpsDirect)
For concrete types with thin pointers.
Indirect(&'static TypeOpsIndirect)
For generic containers with wide pointers (includes shape).
Implementations§
Source§impl TypeOps
impl TypeOps
Sourcepub const fn has_clone_into(&self) -> bool
pub const fn has_clone_into(&self) -> bool
Check if this type has a clone_into operation.
Sourcepub const fn has_default_in_place(&self) -> bool
pub const fn has_default_in_place(&self) -> bool
Check if this type has a default_in_place operation.
Sourcepub const fn truthiness_fn(&self) -> Option<TruthyFn>
pub const fn truthiness_fn(&self) -> Option<TruthyFn>
Returns the truthiness predicate for this type, if any.
Trait Implementations§
Source§impl From<&'static TypeOpsDirect> for TypeOps
impl From<&'static TypeOpsDirect> for TypeOps
Source§fn from(ops: &'static TypeOpsDirect) -> Self
fn from(ops: &'static TypeOpsDirect) -> Self
Converts to this type from the input type.
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 TypeOps
Auto Trait Implementations§
impl Freeze for TypeOps
impl RefUnwindSafe for TypeOps
impl Send for TypeOps
impl Sync for TypeOps
impl Unpin for TypeOps
impl UnwindSafe for TypeOps
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