DecodeCtx

Trait DecodeCtx 

Source
pub trait DecodeCtx<'a>: Send {
    // Required methods
    fn decode_bytes(&mut self) -> Result<&'a [u8], DecodeError>;
    fn remaining(&self) -> &'a [u8] ;
}
Expand description

Context for decoding frames into values.

Note: Type-aware decoding (via facet) is handled by the RPC layer, not directly by DecodeCtx. This trait handles raw byte access.

Required Methods§

Source

fn decode_bytes(&mut self) -> Result<&'a [u8], DecodeError>

Borrow raw bytes from the frame.

Lifetime is tied to the frame — caller must copy if needed longer.

Source

fn remaining(&self) -> &'a [u8]

Get remaining bytes without consuming them.

Implementors§