pub enum Tagged {
Product(Product),
Sum(Sum),
}Expand description
The wire shape of a tagged type, used both at the top level (in
MsgpackTagged::TAGGED) and recursively inside variant payloads.
Variants§
Product(Product)
A struct, tuple struct, or any other product-shaped wire type.
Sum(Sum)
An enum: a discriminated union of variants.
Implementations§
Source§impl Tagged
impl Tagged
Sourcepub fn as_product(self) -> Option<Product>
pub fn as_product(self) -> Option<Product>
Borrow the inner Product if this is a product shape.
Sourcepub const fn empty_product() -> Self
pub const fn empty_product() -> Self
Empty Tagged::Product used for primitives and newtypes.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Tagged
impl RefUnwindSafe for Tagged
impl Send for Tagged
impl Sync for Tagged
impl Unpin for Tagged
impl UnwindSafe for Tagged
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