Struct std::mem::Discriminant
1.21.0 · source · [−]pub struct Discriminant<T>(_);Expand description
Opaque type representing the discriminant of an enum.
See the discriminant function in this module for more information.
Trait Implementations
impl<T> Clone for Discriminant<T>
source
impl<T> Clone for Discriminant<T>
sourcefn clone(&self) -> Discriminant<T>
source
fn clone(&self) -> Discriminant<T>
sourceReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0 · source
fn clone_from(&mut self, source: &Self)
1.0.0 · sourcePerforms copy-assignment from source. Read more
impl<T> Debug for Discriminant<T>
source
impl<T> Debug for Discriminant<T>
sourceimpl<T> Hash for Discriminant<T>
source
impl<T> Hash for Discriminant<T>
sourceimpl<T> PartialEq<Discriminant<T>> for Discriminant<T>
source
impl<T> PartialEq<Discriminant<T>> for Discriminant<T>
sourceimpl<T> Copy for Discriminant<T>
sourceimpl<T> Eq for Discriminant<T>
sourceAuto Trait Implementations
impl<T> RefUnwindSafe for Discriminant<T> where
<T as DiscriminantKind>::Discriminant: RefUnwindSafe,
impl<T> Send for Discriminant<T>
impl<T> Sync for Discriminant<T>
impl<T> Unpin for Discriminant<T>
impl<T> UnwindSafe for Discriminant<T> where
<T as DiscriminantKind>::Discriminant: UnwindSafe,
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
source
impl<T> BorrowMut<T> for T where
T: ?Sized,
sourcefn borrow_mut(&mut self) -> &mut T
const: unstable · source
fn borrow_mut(&mut self) -> &mut T
const: unstable · sourceMutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
source
impl<T> ToOwned for T where
T: Clone,
sourcetype Owned = T
type Owned = T
The resulting type after obtaining ownership.
fn clone_into(&self, target: &mut T)
source
fn clone_into(&self, target: &mut T)
sourceUses borrowed data to replace owned data, usually by cloning. Read more