Crate ndn_tlv

Crate ndn_tlv 

Source
Expand description

§ndn-tlv – TLV encoding foundation for NDN

Implements the NDN Type-Length-Value wire format used by all other crates in the ndn-rs workspace. Parsing is zero-copy over bytes::Bytes buffers.

§Key types

  • TlvReader – zero-copy, streaming TLV parser over byte slices.
  • TlvWriter – growable encoder that produces wire-format BytesMut.
  • read_varu64 / write_varu64 – NDN variable-width integer codec.
  • TlvError – error type for malformed or truncated input.

§Feature flags

  • std (default) – enables std support in bytes. Disable for no_std environments (an allocator is still required).

Re-exports§

pub use error::TlvError;
pub use reader::TlvReader;
pub use writer::TlvWriter;

Modules§

error
reader
writer

Functions§

read_varu64
Read a variable-width unsigned integer (NDN varint encoding).
varu64_size
Returns the number of bytes needed to encode value as a varint.
write_varu64
Write a variable-width unsigned integer into buf. Returns the number of bytes written.