pub struct EncodeEnum<'b, B: Buffer> { /* private fields */ }
Expand description
Encodes an enum
Enum variant is encoded as a list: ["variant", variant_name]
. If variant contains any fields,
they are encoded in the same way as structure fields are encoded.
Implementations§
Source§impl<'b, B: Buffer> EncodeEnum<'b, B>
impl<'b, B: Buffer> EncodeEnum<'b, B>
Sourcepub fn with_variant(self, variant_name: impl AsRef<[u8]>) -> EncodeStruct<'b, B>
pub fn with_variant(self, variant_name: impl AsRef<[u8]>) -> EncodeStruct<'b, B>
Encodes a variant name
Returns a structure encoder that can be used to encode any fields the variant may have
Auto Trait Implementations§
impl<'b, B> Freeze for EncodeEnum<'b, B>
impl<'b, B> RefUnwindSafe for EncodeEnum<'b, B>where
B: RefUnwindSafe,
impl<'b, B> Send for EncodeEnum<'b, B>where
B: Send,
impl<'b, B> Sync for EncodeEnum<'b, B>where
B: Sync,
impl<'b, B> Unpin for EncodeEnum<'b, B>
impl<'b, B> !UnwindSafe for EncodeEnum<'b, B>
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