pub enum Variant2<T0, T1> {
V0(T0),
V1(T1),
}Variants§
Implementations§
Source§impl<T0: 'static, T1: 'static> Variant2<T0, T1>
Returns Some(&T) if the active alternative has type T, else None.
impl<T0: 'static, T1: 'static> Variant2<T0, T1>
Returns Some(&T) if the active alternative has type T, else None.
Source§impl<T0, T1> Variant2<T0, T1>
impl<T0, T1> Variant2<T0, T1>
pub fn operator_assign_mut(&mut self, other: Self)
Source§impl<T0: PartialEq, T1: PartialEq> Variant2<T0, T1>
impl<T0: PartialEq, T1: PartialEq> Variant2<T0, T1>
pub fn variant_operator_eq(&self, other: &Self) -> bool
Source§impl<T0: 'static, T1: 'static> Variant2<T0, T1>
impl<T0: 'static, T1: 'static> Variant2<T0, T1>
pub fn variant_t_enable_if_t_get_type_id_t<T: 'static>(value: T) -> Self
Source§impl<T0: Clone, T1: Clone> Variant2<T0, T1>
impl<T0: Clone, T1: Clone> Variant2<T0, T1>
pub fn variant_variant_mut(&mut self) -> Self
Source§impl<T0, T1> Variant2<T0, T1>
impl<T0, T1> Variant2<T0, T1>
pub fn variant_destructor(&mut self)
Source§impl<T0, T1> Variant2<T0, T1>
impl<T0, T1> Variant2<T0, T1>
Sourcepub fn valueless_by_exception(&self) -> bool
pub fn valueless_by_exception(&self) -> bool
Always false (this port has no valueless state). Matches the C++
valueless_by_exception.
pub fn get_if_0(&self) -> Option<&T0>
pub fn get_if_0_mut(&mut self) -> Option<&mut T0>
pub fn get_if_1(&self) -> Option<&T1>
pub fn get_if_1_mut(&mut self) -> Option<&mut T1>
Trait Implementations§
impl<T0: Eq, T1: Eq> Eq for Variant2<T0, T1>
Source§impl<T0: PartialEq, T1: PartialEq> PartialEq for Variant2<T0, T1>
impl<T0: PartialEq, T1: PartialEq> PartialEq for Variant2<T0, T1>
impl<T0: PartialEq, T1: PartialEq> StructuralPartialEq for Variant2<T0, T1>
Auto Trait Implementations§
impl<T0, T1> Freeze for Variant2<T0, T1>
impl<T0, T1> RefUnwindSafe for Variant2<T0, T1>where
T0: RefUnwindSafe,
T1: RefUnwindSafe,
impl<T0, T1> Send for Variant2<T0, T1>
impl<T0, T1> Sync for Variant2<T0, T1>
impl<T0, T1> Unpin for Variant2<T0, T1>
impl<T0, T1> UnsafeUnpin for Variant2<T0, T1>where
T0: UnsafeUnpin,
T1: UnsafeUnpin,
impl<T0, T1> UnwindSafe for Variant2<T0, T1>where
T0: UnwindSafe,
T1: 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