pub enum Variant1<T0> {
V0(T0),
}Variants§
V0(T0)
Implementations§
Source§impl<T0> Variant1<T0>
impl<T0> Variant1<T0>
Sourcepub unsafe fn variant_fn_copy<T>(dst: *mut c_void, src: *const c_void)where
T: Clone,
pub unsafe fn variant_fn_copy<T>(dst: *mut c_void, src: *const c_void)where
T: Clone,
Port of Variant::fnCopy<T>.
In the C++ implementation, this is used as a type-erased function pointer to perform
a placement-new copy of a specific type T from src to dst.
§Safety
This function is unsafe because it performs raw pointer dereferencing and writes to uninitialized memory.
dstmust be valid for writes and properly aligned forT.srcmust be valid for reads, properly aligned forT, and contain a valid instance ofT.
Source§impl<T0: 'static> Variant1<T0>
Returns Some(&T) if the active alternative has type T, else None.
impl<T0: 'static> Variant1<T0>
Returns Some(&T) if the active alternative has type T, else None.
Source§impl<T0> Variant1<T0>
impl<T0> Variant1<T0>
pub fn operator_assign_mut(&mut self, other: Self)
Source§impl<T0: PartialEq> Variant1<T0>
impl<T0: PartialEq> Variant1<T0>
pub fn variant_operator_eq(&self, other: &Self) -> bool
Source§impl<T0> Variant1<T0>where
T0: PartialEq,
impl<T0> Variant1<T0>where
T0: PartialEq,
pub fn variant_operator_ne(&self, other: &Self) -> bool
Source§impl<T0: 'static> Variant1<T0>
impl<T0: 'static> Variant1<T0>
pub fn variant_t_enable_if_t_get_type_id_t<T: 'static>(value: T) -> Self
Source§impl<T0> Variant1<T0>
impl<T0> Variant1<T0>
pub fn variant_destructor(&mut self)
Trait Implementations§
impl<T0: Eq> Eq for Variant1<T0>
Source§impl<T0: PartialEq> PartialEq for Variant1<T0>
impl<T0: PartialEq> PartialEq for Variant1<T0>
impl<T0: PartialEq> StructuralPartialEq for Variant1<T0>
Auto Trait Implementations§
impl<T0> Freeze for Variant1<T0>where
T0: Freeze,
impl<T0> RefUnwindSafe for Variant1<T0>where
T0: RefUnwindSafe,
impl<T0> Send for Variant1<T0>where
T0: Send,
impl<T0> Sync for Variant1<T0>where
T0: Sync,
impl<T0> Unpin for Variant1<T0>where
T0: Unpin,
impl<T0> UnsafeUnpin for Variant1<T0>where
T0: UnsafeUnpin,
impl<T0> UnwindSafe for Variant1<T0>where
T0: UnwindSafe,
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