pub struct EnumVariantFragment { /* private fields */ }Expand description
One named enum variant.
Implementations§
Source§impl EnumVariantFragment
impl EnumVariantFragment
Sourcepub fn new(name: SchemaName) -> EnumVariantFragment
pub fn new(name: SchemaName) -> EnumVariantFragment
Construct one unit variant.
Sourcepub fn with_payload(name: SchemaName, payload: FieldType) -> EnumVariantFragment
pub fn with_payload(name: SchemaName, payload: FieldType) -> EnumVariantFragment
Construct one payload-bearing variant.
Sourcepub const fn source_key(&self) -> &TypeSourceKey
pub const fn source_key(&self) -> &TypeSourceKey
Borrow the typed proposal key derived from the current variant name.
Sourcepub const fn name(&self) -> &SchemaName
pub const fn name(&self) -> &SchemaName
Borrow the current variant name.
Trait Implementations§
Source§impl Clone for EnumVariantFragment
impl Clone for EnumVariantFragment
Source§fn clone(&self) -> EnumVariantFragment
fn clone(&self) -> EnumVariantFragment
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 EnumVariantFragment
impl Debug for EnumVariantFragment
impl Eq for EnumVariantFragment
Source§impl PartialEq for EnumVariantFragment
impl PartialEq for EnumVariantFragment
impl StructuralPartialEq for EnumVariantFragment
Auto Trait Implementations§
impl Freeze for EnumVariantFragment
impl RefUnwindSafe for EnumVariantFragment
impl Send for EnumVariantFragment
impl Sync for EnumVariantFragment
impl Unpin for EnumVariantFragment
impl UnsafeUnpin for EnumVariantFragment
impl UnwindSafe for EnumVariantFragment
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.