Crate protobuf

Crate protobuf 

Source

Modules§

__internal
The __internal module is for necessary encapsulation breaks between generated code and the runtime.
prelude
Prelude for the Protobuf Rust API.

Macros§

proto
proto! enables the use of Rust struct initialization syntax to create protobuf messages. The macro does its best to try and detect the initialization of submessages, but it is only able to do so while the submessage is being defined as part of the original struct literal. Introducing an expression using () or {} as the value of a field will require another call to this macro in order to return a submessage literal.

Structs§

Map
MapIter
An iterator visiting all key-value pairs in arbitrary order.
MapMut
MapView
ParseError
An error that happened during parsing.
ProtoBytes
ProtoStr
A shared immutable view of a protobuf string field’s contents.
ProtoString
An owned type representing protobuf string field’s contents.
Repeated
A repeated field of T, used as the owned target for Proxied.
RepeatedIter
An iterator over the values inside of a View<Repeated<T>>.
RepeatedMut
Mutates the elements in a repeated field of T.
RepeatedView
Views the elements in a repeated field of T.
SerializeError
An error that happened during serialization.
UnknownEnumValue
An integer value wasn’t known for an enum while converting.
Utf8Error
The bytes were not valid UTF-8.

Enums§

Optional
A protobuf value from a field that may not be set.
ProtoBytesCow
ProtoStringCow

Traits§

AsMut
Used to semantically do a cheap “to-mut-reference” conversion. This is implemented on both owned Proxied types as well as MutProxy types.
AsView
Used to semantically do a cheap “to-reference” conversion. This is implemented on both owned Proxied types as well as ViewProxy and MutProxy types.
Clear
ClearAndParse
CopyFrom
Copies the contents from src into self.
Enum
Implemented by all generated enum types.
IntoMut
Used to turn another ‘borrow’ into a MutProxy.
IntoProxied
A value to Proxied-value conversion that consumes the input value.
IntoView
Used to turn another ‘borrow’ into a ViewProxy.
MergeFrom
Message
A trait that all generated owned message types implement.
MessageMut
A trait that all generated message muts implement.
MessageMutInterop
Traits related to message mut interop. Note that these trait fns are only available on C++ kernel as upb interop of owned messages requires more work to handle the Arena behavior.
MessageView
A trait that all generated message views implement.
MessageViewInterop
Traits related to message view interop.
MutProxied
A type that can be be accessed through a reference-like proxy.
MutProxy
Declares operations common to all mut proxies.
OwnedMessageInterop
Traits related to owned message interop. Note that these trait fns are only available on C++ kernel as upb interop of owned messages requires more work to handle the Arena behavior.
Parse
Proxied
A type that can be accessed through a reference-like proxy.
ProxiedInMapValue
ProxiedInRepeated
Types that can appear in a Repeated<T>.
Proxy
Declares conversion operations common to all proxies (both views and mut proxies).
Serialize
TakeFrom
Moves the contents from src into self.
ViewProxy
Declares conversion operations common to view proxies.

Type Aliases§

Mut
A proxy type that provides exclusive mutable access to a T, like a &'msg mut T.
View
A proxy type that provides shared access to a T, like a &'msg T.