Struct type_description::EnumVariant
source · [−]pub struct EnumVariant { /* private fields */ }
Expand description
A variant in a TypeKind::Enum
Implementations
sourceimpl EnumVariant
impl EnumVariant
sourcepub fn new(
name: &'static str,
doc: Option<&'static str>,
repr: EnumVariantRepresentation
) -> Self
pub fn new(
name: &'static str,
doc: Option<&'static str>,
repr: EnumVariantRepresentation
) -> Self
Create a new StructField
sourcepub fn repr(&self) -> &EnumVariantRepresentation
pub fn repr(&self) -> &EnumVariantRepresentation
Get the variants’s representation.
Trait Implementations
sourceimpl Debug for EnumVariant
impl Debug for EnumVariant
sourceimpl<'de> Deserialize<'de> for EnumVariant
impl<'de> Deserialize<'de> for EnumVariant
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Hash for EnumVariant
impl Hash for EnumVariant
sourceimpl PartialEq<EnumVariant> for EnumVariant
impl PartialEq<EnumVariant> for EnumVariant
sourcefn eq(&self, other: &EnumVariant) -> bool
fn eq(&self, other: &EnumVariant) -> bool
sourceimpl Serialize for EnumVariant
impl Serialize for EnumVariant
impl Eq for EnumVariant
impl StructuralEq for EnumVariant
impl StructuralPartialEq for EnumVariant
Auto Trait Implementations
impl RefUnwindSafe for EnumVariant
impl Send for EnumVariant
impl Sync for EnumVariant
impl Unpin for EnumVariant
impl UnwindSafe for EnumVariant
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.