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§
Sourcefn decode_bytes(&mut self) -> Result<&'a [u8], DecodeError>
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.