pub struct BitwiseCodec;Expand description
Bitwise codec runtime object: the canonical, minimal sibling of
codec:binary.
As a general-purpose expression codec it round-trips kernel Expr values as
bit-packed, self-delimiting frames, implementing every codec role –
Decoder/Encoder, located LocatedDecoder/LocatedEncoder, and
tree TreeDecoder/TreeEncoder – over the shared Expr graph. It
fails closed (under DecodeLimits) on any input that is not a well-formed
frame, and its plain-mode output is the smallest canonical byte string for a
value. Decoded bytes are treated strictly as data, never as executable input.
Trait Implementations§
Source§impl Decoder for BitwiseCodec
impl Decoder for BitwiseCodec
Source§impl Encoder for BitwiseCodec
impl Encoder for BitwiseCodec
Source§impl LocatedDecoder for BitwiseCodec
impl LocatedDecoder for BitwiseCodec
Source§fn decode_located(
&self,
cx: &mut ReadCx<'_>,
input: Input,
_source_id: String,
) -> Result<LocatedExpr>
fn decode_located( &self, cx: &mut ReadCx<'_>, input: Input, _source_id: String, ) -> Result<LocatedExpr>
Source§impl LocatedEncoder for BitwiseCodec
impl LocatedEncoder for BitwiseCodec
Source§fn encode_located(
&self,
cx: &mut WriteCx<'_>,
expr: &LocatedExpr,
) -> Result<Output>
fn encode_located( &self, cx: &mut WriteCx<'_>, expr: &LocatedExpr, ) -> Result<Output>
Encode a
LocatedExpr, optionally using its origin for fidelity.Source§impl TreeDecoder for BitwiseCodec
impl TreeDecoder for BitwiseCodec
Source§fn decode_tree(
&self,
cx: &mut ReadCx<'_>,
input: Input,
_source_id: String,
) -> Result<LocatedExprTree>
fn decode_tree( &self, cx: &mut ReadCx<'_>, input: Input, _source_id: String, ) -> Result<LocatedExprTree>
Source§impl TreeEncoder for BitwiseCodec
impl TreeEncoder for BitwiseCodec
Source§fn encode_tree(
&self,
cx: &mut WriteCx<'_>,
expr: &LocatedExprTree,
) -> Result<Output>
fn encode_tree( &self, cx: &mut WriteCx<'_>, expr: &LocatedExprTree, ) -> Result<Output>
Encode a
LocatedExprTree, reproducing layout and trivia where present.Auto Trait Implementations§
impl Freeze for BitwiseCodec
impl RefUnwindSafe for BitwiseCodec
impl Send for BitwiseCodec
impl Sync for BitwiseCodec
impl Unpin for BitwiseCodec
impl UnsafeUnpin for BitwiseCodec
impl UnwindSafe for BitwiseCodec
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