Skip to main content

Module wire

Module wire 

Source
Expand description

Codec trait for on-wire structures.

Every SMB message structure implements Wire, providing:

  • decode: parse from a byte slice, borrowing variable-length data (zero-copy — no intermediate copies)
  • encode: serialize into a growable byte buffer

Endianness is handled explicitly via [endian] helpers (from_le_bytes / to_le_bytes) rather than native casting, so the code is correct on any host architecture.

Structs§

Ctx
Context threaded through encode/decode calls.

Traits§

Wire
Codec trait for fixed-layout and variable-layout on-wire structures.