Crate protobuf[][src]

Library to read and write protocol buffers data.

Re-exports

pub use error::ProtobufError;
pub use error::ProtobufResult;

Modules

atomic_flags

Library to configure runtime configurations

descriptor

Generated file from google/protobuf/descriptor.proto

error

Protobuf error type

ext

Utilities to support “extension” fields.

lazy

Lazily initialized data. Used in generated code.

plugin

Generated file from google/protobuf/compiler/plugin.proto

reflect

Reflection implementation for protobuf types.

rt

Functions used by generated protobuf code. Should not be used by programs written by hands.

rustproto

Generated file from rustproto.proto

text_format

Protobuf “text format” implementation.

types

Implementations of ProtobufType for all types.

well_known_types

Generated code for “well known types”

wire_format

Serialization constants.

Macros

debug_to_pb_print

Impl PbPrint if there is a Debug impl.

Structs

CachedSize

Cached size field used in generated code. It is always equal to itself to simplify generated code. (Generated code can use #[derive(Eq)]).

Chars

Thin wrapper around Bytes which guarantees that bytes are valid UTF-8 string.

CodedInputStream

Buffered read with handy utilities.

CodedOutputStream

Buffered write with handy utilities

RepeatedField

Wrapper around vector to avoid deallocations on clear.

SingularField

Like Option<T>, but keeps the actual element on clear.

SingularPtrField

Like Option<Box<T>>, but keeps the actual element on clear.

UnknownFields

Hold “unknown” fields in parsed message.

UnknownFieldsIter

Iterator over UnknownFields

UnknownValues

Field unknown values.

UnknownValuesIter

Iterator over unknown values

Enums

UnknownValue

Unknown value.

UnknownValueRef

Reference to unknown value.

Constants

VERSION

protobuf crate version

VERSION_2_8_0

This symbol can be referenced to assert that proper version of crate is used

Traits

Clear

anything that can be cleared

Message

Trait implemented for all generated structs for protobuf messages.

PbPrint

A trait used for pretty printing protobuf message.

ProtobufEnum

Trait implemented by all protobuf enum types.

Functions

parse_from_bytes

Parse message from byte array.

parse_from_carllerche_bytes

Parse message from Bytes object. Resulting message may share references to the passed bytes object.

parse_from_reader

Parse message from reader. Parse stops on EOF or when error encountered.

parse_length_delimited_fromDeprecated

Parse length-delimited message from stream.

parse_length_delimited_from_bytesDeprecated

Parse length-delimited message from bytes.

parse_length_delimited_from_readerDeprecated

Parse length-delimited message from Read.

push_field_start

Push name to buf.

push_message_start

Push name to buf.