Expand description
Protobuf-free runtime for reading and writing the ProtoCache wire format.
Encoded documents are represented as little-endian u32 words. Read-only
views borrow those words and do not allocate; mutable wrappers decode fields
lazily and can preserve untouched encoded data when serializing again.
Most applications start with runtime::MessageView. Code generated by
protoc-gen-pcrs builds typed accessors on the same runtime. Use
mutable for document updates and encoding for schema-independent,
low-level construction.
Constructors return None when the supplied words do not contain a valid
value of the requested shape. Callers that accept untrusted data should use
those checked constructors instead of the expect_* convenience methods.
Re-exports§
pub use access::ArrayIter;pub use access::ArrayView;pub use access::BoolArray;pub use access::FieldDecode;pub use access::FieldView;pub use access::MapIter;pub use access::MapKey;pub use access::MapView;pub use access::MessageView;pub use access::PairView;pub use access::ScalarArray;pub use access::StringView;pub use access::ViewArray;pub use access::ViewMap;pub use access::detect_array_with;pub use access::detect_map_with;pub use access::detect_slice_end;pub use mutable::MutableArray;pub use mutable::MutableArrayElement;pub use mutable::MutableError;pub use mutable::MutableField;pub use mutable::MutableMap;pub use mutable::MutableMapKey;pub use mutable::MutableMapKeyKind;pub use mutable::MutableMessage;pub use mutable::copy_words;pub use perfect_hash::PerfectHashView;pub use serialize::Segment;pub use serialize::Unit;pub use serialize::build_perfect_hash_index;pub use serialize::build_perfect_hash_index_with_positions;pub use serialize::fold_field;pub use serialize::serialize_array;pub use serialize::serialize_array_at;pub use serialize::serialize_array_at_mut;pub use serialize::serialize_bool;pub use serialize::serialize_bytes;pub use serialize::serialize_map;pub use serialize::serialize_map_at;pub use serialize::serialize_map_at_mut;pub use serialize::serialize_message;pub use serialize::serialize_message_at;pub use serialize::serialize_scalar;pub use serialize::serialize_str;pub use utils::Buffer;pub use utils::Bytes;pub use utils::CorruptionKind;pub use utils::EnumValue;pub use utils::ReadError;pub use utils::Scalar;pub use utils::Words;pub use utils::compress;pub use utils::compress_into;pub use utils::decompress;pub use utils::decompress_into;
Modules§
- access
- Zero-copy views over encoded strings, messages, arrays, and maps.
Access surface matching
access.h. - encoding
- Common low-level write APIs re-exported for Rust-first integrations.
- mutable
- Mutable containers and traits used by generated mutable bindings.
Mutable surface matching
access-ex.h. - perfect_
hash - Reader and builder support for ProtoCache perfect-hash indexes.
Perfect-hash surface matching
perfect_hash.h. - runtime
- Common zero-copy read APIs re-exported for Rust-first integrations.
- serialize
- Low-level encoding primitives for schema-independent writers.
Serialization surface matching
serialize.h. - utils
- Shared scalar, buffer, compression, and error utilities.
Utility surface matching
utils.h.