pub struct EnumVariantModel { /* private fields */ }Expand description
EnumVariantModel
EnumVariantModel carries structural decode metadata for one generated enum variant payload. Runtime structural decode uses this to stay on the field-kind contract for enum payloads instead of falling back to generic untyped CBOR decoding.
Implementations§
Source§impl EnumVariantModel
impl EnumVariantModel
Sourcepub const fn new(
ident: &'static str,
payload_kind: Option<&'static FieldKind>,
payload_storage_decode: FieldStorageDecode,
) -> Self
pub const fn new( ident: &'static str, payload_kind: Option<&'static FieldKind>, payload_storage_decode: FieldStorageDecode, ) -> Self
Build one enum variant structural decode descriptor.
Sourcepub const fn payload_kind(&self) -> Option<&'static FieldKind>
pub const fn payload_kind(&self) -> Option<&'static FieldKind>
Return the declared payload kind when this variant carries data.
Sourcepub const fn payload_storage_decode(&self) -> FieldStorageDecode
pub const fn payload_storage_decode(&self) -> FieldStorageDecode
Return the persisted payload decode contract for this variant.
Trait Implementations§
Source§impl Clone for EnumVariantModel
impl Clone for EnumVariantModel
Source§fn clone(&self) -> EnumVariantModel
fn clone(&self) -> EnumVariantModel
Returns a duplicate 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 EnumVariantModel
impl Debug for EnumVariantModel
impl Copy for EnumVariantModel
Auto Trait Implementations§
impl Freeze for EnumVariantModel
impl RefUnwindSafe for EnumVariantModel
impl Send for EnumVariantModel
impl Sync for EnumVariantModel
impl Unpin for EnumVariantModel
impl UnsafeUnpin for EnumVariantModel
impl UnwindSafe for EnumVariantModel
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