Skip to main content

Crate layline_core

Crate layline_core 

Source
Expand description

Runtime for layline.

no_std, with no dependencies.

  • Layout: a fixed-size type, described by a FieldDef table.
  • Message: a variable-length type, described by a SegmentDef table.
  • audit: prints those tables.
  • frame (feature frame): stream framing.
  • num (feature num): LEB128, Exp-Golomb and reserved values.

Re-exports§

pub use checksum::Checksum;
pub use text::TextCodec;alloc

Modules§

audit
The audit format: every table of a type, one record per line.
checksum
The Checksum trait, and built-in checksums.
frameframe
Stream framing.
numnum
Number codings: reserved values, LEB128 and Exp-Golomb.
table
Table row types, and the const fns that check them.
textalloc
Text encodings for #[text] fields.

Structs§

BitReader
A bit cursor that reads from a byte slice.
BitWriter
A bit cursor that appends to a Buffer.
Extent
A field’s bit offset and width, numbered LSB0.
Fixed
A Buffer over a caller’s byte slice, for encoding without an allocator.
I
A two’s-complement signed integer exactly N bits wide, with N in 1..=64.
Nonzero
A flag stored in BITS bits that is set when any of them is.
Overflow
A buffer ran out of room during encode.
U
An unsigned integer exactly N bits wide, with N in 1..=64.

Enums§

LayoutError
Why a field table does not exactly cover its container.
ParseError
Why a decode failed.

Constants§

MAX_NESTING_DEPTH
The nesting depth, in messages, past which decode returns ParseError::TooDeep.

Traits§

BitCodec
A value whose width in bits is read from the wire.
Buffer
A byte buffer that encode appends to and patches.
Choice
The arms of a #[switch] field. #[derive(Message)] on an enum implements it.
Dispatch
A catalogue of payloads keyed by id. #[derive(Dispatch)] implements it.
FieldCodec
A type stored in a fixed number of bits.
Layout
A fixed-size type whose named fields cover every bit.
Message
A variable-length type, described by a segment table.
MessageRef
A variable-length type whose fields borrow the bytes it decodes from.
Slot
The variant of Self that holds a T.
VarCodec
A value whose width in bytes is read from the wire.
View
A #[repr(transparent)] view over a Layout’s wire bytes.
WireInt
An integer read from the wire, such as a count, length or offset.