Struct postcard::experimental::schema::NamedVariant
source · pub struct NamedVariant {
pub name: &'static str,
pub ty: &'static SdmTy,
}
Available on crate feature
experimental-derive
only.Expand description
An enum variant with a name, e.g. T::Bar(...)
Fields§
§name: &'static str
The name of this variant
ty: &'static SdmTy
The type of this variant
Trait Implementations§
source§impl Clone for NamedVariant
impl Clone for NamedVariant
source§fn clone(&self) -> NamedVariant
fn clone(&self) -> NamedVariant
Returns a copy 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 NamedVariant
impl Debug for NamedVariant
source§impl Hash for NamedVariant
impl Hash for NamedVariant
source§impl PartialEq<NamedVariant> for NamedVariant
impl PartialEq<NamedVariant> for NamedVariant
source§fn eq(&self, other: &NamedVariant) -> bool
fn eq(&self, other: &NamedVariant) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for NamedVariant
impl Serialize for NamedVariant
impl Eq for NamedVariant
impl StructuralEq for NamedVariant
impl StructuralPartialEq for NamedVariant
Auto Trait Implementations§
impl RefUnwindSafe for NamedVariant
impl Send for NamedVariant
impl Sync for NamedVariant
impl Unpin for NamedVariant
impl UnwindSafe for NamedVariant
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