Enum protobuf_parser::FieldType [] [src]

pub enum FieldType {
    Int32,
    Int64,
    Uint32,
    Uint64,
    Sint32,
    Sint64,
    Bool,
    Fixed64,
    Sfixed64,
    Double,
    String,
    Bytes,
    Fixed32,
    Sfixed32,
    Float,
    MessageOrEnum(String),
    Map(Box<(FieldType, FieldType)>),
    Group(Vec<Field>),
}

Protobuf supported field types

TODO: Groups (even if deprecated)

Variants

Protobuf int32

Remarks

Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead.

Protobuf int64

Remarks

Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead.

Protobuf uint32

Remarks

Uses variable-length encoding.

Protobuf uint64

Remarks

Uses variable-length encoding.

Protobuf sint32

Remarks

Uses ZigZag variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s.

Protobuf sint64

Remarks

Uses ZigZag variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s.

Protobuf bool

Protobuf fixed64

Remarks

Always eight bytes. More efficient than uint64 if values are often greater than 2^56.

Protobuf sfixed64

Remarks

Always eight bytes.

Protobuf double

Protobuf string

Remarks

A string must always contain UTF-8 encoded or 7-bit ASCII text.

Protobuf bytes

Remarks

May contain any arbitrary sequence of bytes.

Protobut fixed32

Remarks

Always four bytes. More efficient than uint32 if values are often greater than 2^28.

Protobut sfixed32

Remarks

Always four bytes.

Protobut float

Protobuf message or enum (holds the name)

Protobut map

Protobuf group (deprecated)

Trait Implementations

impl Debug for FieldType
[src]

[src]

Formats the value using the given formatter. Read more

impl Clone for FieldType
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl PartialEq for FieldType
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl Eq for FieldType
[src]

impl Hash for FieldType
[src]

[src]

Feeds this value into the given [Hasher]. Read more

1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

Auto Trait Implementations

impl Send for FieldType

impl Sync for FieldType