pub enum WirePayloadShape {
Empty,
RawStr,
RawBytes,
OptRawStr,
OptRawBytes,
FixedScalar(HybridType),
FixedStruct {
name: String,
size: usize,
},
Positional,
}Expand description
Zero-waste wire payload encoding strategy for ByteTransport requests, replies, and push events.
Variants§
Empty
Zero bytes (&[]).
RawStr
Single raw UTF-8 slice (zero length prefix; slice length IS string length).
RawBytes
Single raw byte slice (zero length prefix; slice length IS byte length).
OptRawStr
Option<String>: &[0] for None, [1, utf8...] for Some (zero 4-byte len prefix).
OptRawBytes
Option<Vec<u8>>: &[0] for None, [1, bytes...] for Some (zero 4-byte len prefix).
FixedScalar(HybridType)
Single fixed scalar/enum/bool encoded directly into a stack [u8; 1|2|4|8].
FixedStruct
Single fixed-size struct encoded into a stack [u8; N] (N <= 512).
Positional
General positional nativeview-codec stream (uses try_with_stack_writer::<512>).
Trait Implementations§
Source§impl Clone for WirePayloadShape
impl Clone for WirePayloadShape
Source§fn clone(&self) -> WirePayloadShape
fn clone(&self) -> WirePayloadShape
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 WirePayloadShape
impl Debug for WirePayloadShape
impl Eq for WirePayloadShape
Source§impl PartialEq for WirePayloadShape
impl PartialEq for WirePayloadShape
impl StructuralPartialEq for WirePayloadShape
Auto Trait Implementations§
impl Forget for WirePayloadShape
impl Freeze for WirePayloadShapewhere
*const HybridType is !null: Freeze,
PhantomData<HybridType>: Freeze,
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
impl Move for WirePayloadShape
impl RefUnwindSafe for WirePayloadShape
impl Send for WirePayloadShape
impl Sync for WirePayloadShape
impl Unpin for WirePayloadShape
impl UnsafeUnpin for WirePayloadShapewhere
*const HybridType is !null: UnsafeUnpin,
PhantomData<HybridType>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
impl UnwindSafe for WirePayloadShape
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