pub struct WireVariant {
pub name: String,
pub body: VariantBody,
}Expand description
One variant of a sum type.
Fields§
§name: StringThe serialized name, after rename and rename_all.
body: VariantBodyImplementations§
Source§impl WireVariant
impl WireVariant
Sourcepub fn new(name: impl Into<String>, body: VariantBody) -> Self
pub fn new(name: impl Into<String>, body: VariantBody) -> Self
Declare one variant.
Trait Implementations§
Source§impl Clone for WireVariant
impl Clone for WireVariant
Source§fn clone(&self) -> WireVariant
fn clone(&self) -> WireVariant
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 WireVariant
impl Debug for WireVariant
impl Eq for WireVariant
Source§impl PartialEq for WireVariant
impl PartialEq for WireVariant
impl StructuralPartialEq for WireVariant
Auto Trait Implementations§
impl Freeze for WireVariant
impl RefUnwindSafe for WireVariant
impl Send for WireVariant
impl Sync for WireVariant
impl Unpin for WireVariant
impl UnsafeUnpin for WireVariant
impl UnwindSafe for WireVariant
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