Skip to main content

Crate protowire_pb

Crate protowire_pb 

Source
Expand description

Schema-free protobuf binary codec.

Port of github.com/trendvidia/protowire/encoding/pb and the TS port’s pb module. Two layers:

  • wire: low-level primitives (varint, zigzag, fixed widths, tags, length-delimited blobs, skip-on-unknown).
  • codec: the codec::Message trait + nested-message helpers.

Idiomatic Rust differs from the Go (struct tags via reflection) and TS (runtime field schemas) ports: each Rust message implements Message by hand. The wire bytes match all five ports per protowire/scripts/cross_envelope_check.sh.

Re-exports§

pub use codec::marshal;
pub use codec::read_message;
pub use codec::unmarshal;
pub use codec::write_message;
pub use codec::Message;
pub use wire::Error;
pub use wire::Reader;
pub use wire::Result;
pub use wire::WireType;
pub use wire::Writer;

Modules§

codec
Schema-driven binary marshal/unmarshal via the Message trait.
wire
Low-level protobuf wire-format primitives: varint, zigzag, fixed32/64, length-delimited bytes, and tag (field-number + wire-type) encoding.