Skip to main content

Crate pbrs

Crate pbrs 

Source
Expand description

Pure-Rust protobuf kernel. Application API matches Google protobuf v4.

Not crates.io protobuf 4.x (upb/C). Not prost. Official protoc --rust_out links against __internal::runtime.

ⓘ
pbrs = { git = "https://github.com/mingley/pure-protobuf" }

Re-exports§

pub use Singular as ProxiedInRepeated;

Modules§

codegen
Generate field-wise typed messages (not DynamicMessage wrappers, not upb).
copy_counts
Bench-only user-space copy counters (SB-13, Phase 0 attribution).
gen_support
Helpers for plugin-generated typed wrappers around DynamicMessage.
gencode
Field-wise generated TestAllTypes + WKT used by the conformance program.
json
Proto3 JSON mapping.
prelude
Prelude for the Protobuf Rust API.
rt
Runtime helpers for generated code. Not a Google upb kernel.
testdata
Hand-written typed messages with the v4 accessor shape.
text
Protocol buffer text format (textproto).

Macros§

impl_generated_message
Typed message wrapping a DynamicMessage. Used by plugin gencode and the TestAllTypes wrappers the conformance program drives.
impl_typed_message
Trait impls for field-wise generated messages (merge_bytes / write_to / compute_size).
proto
proto! enables Rust struct-init syntax for protobuf messages.

Structs§

DescriptorOption
One custom option on a file, message, field, enum, or method descriptor.
DescriptorPool
DynamicMessage
DynamicMessageMut
DynamicMessageView
EnumDescriptor
FieldDescriptor
FileDescriptor
Map
Empty is an 8-byte null. Parse appends to a Vec (last-wins). Lookup uses a lazy index.
MapIter
MapMut
MapView
MessageDescriptor
MethodDescriptor
ParseError
An error that happened during parsing.
ProtoBytes
Owned protobuf bytes.
ProtoStr
Shared immutable view of a protobuf string field. May contain invalid UTF-8.
ProtoString
Owned protobuf string. May contain invalid UTF-8 (C++ interop).
Repeated
Empty is an 8-byte null. Box<Vec<_>> so unused TAT collections stay off the struct.
RepeatedIter
RepeatedMut
Mutable proxy of a repeated field.
RepeatedView
View of a repeated field.
SerializeError
An error that happened during serialization.
ServiceDescriptor
UnknownEnumValue
An integer value wasn’t known for an enum while converting.
UnknownFields
Utf8Error
The bytes were not valid UTF-8.

Enums§

Cardinality
FieldType
MapKeyValue
Presence
Value

Constants§

RECURSION_LIMIT
Maximum nesting depth for binary, JSON, and text parse. A payload nested more than this many messages returns ParseError.

Traits§

AsMut
AsView
Clear
ClearAndParse
CopyFrom
Enum
Implemented by generated enum types.
IntoMut
IntoProxied
A value-to-Proxied conversion that consumes the input.
IntoView
MapKey
Types allowed as map keys.
MapValue
Types allowed as map values.
MergeFrom
Message
A trait that all owned message types implement.
MessageMut
A trait that all message muts implement.
MessageName
The protobuf full name of a generated message (package.Message).
MessageType
Marker implemented only by message types.
MessageView
A trait that all message views implement.
MutProxied
A type that can be accessed through a mutable proxy.
Parse
Operations related to constructing a message.
ProtoPut
Used by proto! list/map literals so a field mutator can take either a repeated element or a map key/value pair.
Proxied
A type that can be accessed through a reference-like proxy.
Serialize
Operations related to reading a message.
Singular
Types allowed as a simple field, repeated element, or map value.
TakeFrom
WireOut
Byte sink for binary encode. Implemented for every BufMut (Vec<u8>, BytesMut, tonic EncodeBuf).

Functions§

message_eq
Message equality which may have false-negatives in the face of unknown fields.

Type Aliases§

Mut
View