pub struct VariantCase { /* private fields */ }
Implementations§
Source§impl VariantCase
impl VariantCase
pub fn empty(name: impl Into<Ident>) -> Self
pub fn value(name: impl Into<Ident>, ty: Type) -> Self
pub fn set_name(&mut self, name: impl Into<Ident>)
pub fn name(&self) -> &Ident
pub fn name_mut(&mut self) -> &mut Ident
pub fn type_(&self) -> Option<&Type>
pub fn type_mut(&mut self) -> &mut Option<Type>
pub fn set_docs(&mut self, docs: Option<impl Into<Docs>>)
pub fn docs(&self) -> &Option<Docs>
Trait Implementations§
Source§impl Clone for VariantCase
impl Clone for VariantCase
Source§fn clone(&self) -> VariantCase
fn clone(&self) -> VariantCase
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for VariantCase
impl Debug for VariantCase
Source§impl<'de> Deserialize<'de> for VariantCase
impl<'de> Deserialize<'de> for VariantCase
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
Source§impl Hash for VariantCase
impl Hash for VariantCase
Source§impl<N> Into<VariantCase> for (N,)
impl<N> Into<VariantCase> for (N,)
Source§fn into(self) -> VariantCase
fn into(self) -> VariantCase
Converts this type into the (usually inferred) input type.
Source§impl<N> Into<VariantCase> for (N, Type)
impl<N> Into<VariantCase> for (N, Type)
Source§fn into(self) -> VariantCase
fn into(self) -> VariantCase
Converts this type into the (usually inferred) input type.
Source§impl<N, D> Into<VariantCase> for (N, Type, D)
impl<N, D> Into<VariantCase> for (N, Type, D)
Source§fn into(self) -> VariantCase
fn into(self) -> VariantCase
Converts this type into the (usually inferred) input type.
Source§impl Ord for VariantCase
impl Ord for VariantCase
Source§fn cmp(&self, other: &VariantCase) -> Ordering
fn cmp(&self, other: &VariantCase) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for VariantCase
impl PartialEq for VariantCase
Source§impl PartialOrd for VariantCase
impl PartialOrd for VariantCase
Source§impl Serialize for VariantCase
impl Serialize for VariantCase
impl Eq for VariantCase
impl StructuralPartialEq for VariantCase
Auto Trait Implementations§
impl Freeze for VariantCase
impl RefUnwindSafe for VariantCase
impl Send for VariantCase
impl Sync for VariantCase
impl Unpin for VariantCase
impl UnwindSafe for VariantCase
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> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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.