pub struct UnionType {
pub name: String,
pub variants: Vec<String>,
}Expand description
Aka Rust’s complex enums, e.g. Result, Option.
The surface syntax of C-style and complex enums may look similar, but the underlying implementation is very different.
If you “tweak” a enum from enum { A } to enum { A(u8) }, everything changes.
Fields§
§name: String§variants: Vec<String>Trait Implementations§
Source§impl<'de> Deserialize<'de> for UnionType
impl<'de> Deserialize<'de> for UnionType
Source§fn 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
impl Eq for UnionType
impl StructuralPartialEq for UnionType
Auto Trait Implementations§
impl Freeze for UnionType
impl RefUnwindSafe for UnionType
impl Send for UnionType
impl Sync for UnionType
impl Unpin for UnionType
impl UnwindSafe for UnionType
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.