enum SystemRepr {
Typed(TypedSystemRepr),
Generic(GenericSystemRepr),
}Expand description
A transient decode shim: serde tries the typed shape, then the generic
one, and the value is moved once into a Message. Never stored or
cloned, so the byte gap between its arms - what large_enum_variant
measures - is paid nowhere, and boxing the typed arm instead would add
an allocation per lifecycle frame.
Variants§
Typed(TypedSystemRepr)
Generic(GenericSystemRepr)
Trait Implementations§
Source§impl Clone for SystemRepr
impl Clone for SystemRepr
Source§impl Debug for SystemRepr
impl Debug for SystemRepr
Source§impl<'de> Deserialize<'de> for SystemRepr
impl<'de> Deserialize<'de> for SystemRepr
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for SystemRepr
impl RefUnwindSafe for SystemRepr
impl Send for SystemRepr
impl Sync for SystemRepr
impl Unpin for SystemRepr
impl UnsafeUnpin for SystemRepr
impl UnwindSafe for SystemRepr
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