[−][src]Trait protobuf::types::ProtobufType
Associated Types
type Value: ProtobufValue + Clone + 'static
Required methods
fn wire_type() -> WireType
fn read(is: &mut CodedInputStream) -> ProtobufResult<Self::Value>
fn compute_size(value: &Self::Value) -> u32
fn write_with_cached_size(
field_number: u32,
value: &Self::Value,
os: &mut CodedOutputStream
) -> ProtobufResult<()>
field_number: u32,
value: &Self::Value,
os: &mut CodedOutputStream
) -> ProtobufResult<()>
Provided methods
fn compute_size_with_length_delimiter(value: &Self::Value) -> u32
Compute size adding length prefix if wire type is length delimited (i. e. string, bytes, message)
fn get_from_unknown(_unknown_values: &UnknownValues) -> Option<Self::Value>
fn get_cached_size(value: &Self::Value) -> u32
Get previously computed size
fn get_cached_size_with_length_delimiter(value: &Self::Value) -> u32
Get previously cached size with length prefix
Implementors
impl ProtobufType for ProtobufTypeBool[src]
impl ProtobufType for ProtobufTypeBooltype Value = bool
fn wire_type() -> WireType | [src] |
fn read(is: &mut CodedInputStream) -> ProtobufResult<bool> | [src] |
fn get_from_unknown(unknown: &UnknownValues) -> Option<bool> | [src] |
fn compute_size(_value: &bool) -> u32 | [src] |
fn write_with_cached_size( | [src] |
fn compute_size_with_length_delimiter(value: &Self::Value) -> u32 | [src] |
fn get_cached_size(value: &Self::Value) -> u32 | [src] |
fn get_cached_size_with_length_delimiter(value: &Self::Value) -> u32 | [src] |
impl ProtobufType for ProtobufTypeBytes[src]
impl ProtobufType for ProtobufTypeBytestype Value = Vec<u8>
fn wire_type() -> WireType | [src] |
fn read(is: &mut CodedInputStream) -> ProtobufResult<Vec<u8>> | [src] |
fn compute_size(value: &Vec<u8>) -> u32 | [src] |
fn write_with_cached_size( | [src] |
fn compute_size_with_length_delimiter(value: &Self::Value) -> u32 | [src] |
fn get_from_unknown(_unknown_values: &UnknownValues) -> Option<Self::Value> | [src] |
fn get_cached_size(value: &Self::Value) -> u32 | [src] |
fn get_cached_size_with_length_delimiter(value: &Self::Value) -> u32 | [src] |
impl ProtobufType for ProtobufTypeDouble[src]
impl ProtobufType for ProtobufTypeDoubletype Value = f64
fn wire_type() -> WireType | [src] |
fn read(is: &mut CodedInputStream) -> ProtobufResult<f64> | [src] |
fn compute_size(_value: &f64) -> u32 | [src] |
fn write_with_cached_size( | [src] |
fn compute_size_with_length_delimiter(value: &Self::Value) -> u32 | [src] |
fn get_from_unknown(_unknown_values: &UnknownValues) -> Option<Self::Value> | [src] |
fn get_cached_size(value: &Self::Value) -> u32 | [src] |
fn get_cached_size_with_length_delimiter(value: &Self::Value) -> u32 | [src] |
impl ProtobufType for ProtobufTypeFixed32[src]
impl ProtobufType for ProtobufTypeFixed32type Value = u32
fn wire_type() -> WireType | [src] |
fn read(is: &mut CodedInputStream) -> ProtobufResult<u32> | [src] |
fn compute_size(_value: &u32) -> u32 | [src] |
fn write_with_cached_size( | [src] |
fn compute_size_with_length_delimiter(value: &Self::Value) -> u32 | [src] |
fn get_from_unknown(_unknown_values: &UnknownValues) -> Option<Self::Value> | [src] |
fn get_cached_size(value: &Self::Value) -> u32 | [src] |
fn get_cached_size_with_length_delimiter(value: &Self::Value) -> u32 | [src] |
impl ProtobufType for ProtobufTypeFixed64[src]
impl ProtobufType for ProtobufTypeFixed64type Value = u64
fn wire_type() -> WireType | [src] |
fn read(is: &mut CodedInputStream) -> ProtobufResult<u64> | [src] |
fn compute_size(_value: &u64) -> u32 | [src] |
fn write_with_cached_size( | [src] |
fn compute_size_with_length_delimiter(value: &Self::Value) -> u32 | [src] |
fn get_from_unknown(_unknown_values: &UnknownValues) -> Option<Self::Value> | [src] |
fn get_cached_size(value: &Self::Value) -> u32 | [src] |
fn get_cached_size_with_length_delimiter(value: &Self::Value) -> u32 | [src] |
impl ProtobufType for ProtobufTypeFloat[src]
impl ProtobufType for ProtobufTypeFloattype Value = f32
fn wire_type() -> WireType | [src] |
fn read(is: &mut CodedInputStream) -> ProtobufResult<f32> | [src] |
fn compute_size(_value: &f32) -> u32 | [src] |
fn write_with_cached_size( | [src] |
fn compute_size_with_length_delimiter(value: &Self::Value) -> u32 | [src] |
fn get_from_unknown(_unknown_values: &UnknownValues) -> Option<Self::Value> | [src] |
fn get_cached_size(value: &Self::Value) -> u32 | [src] |
fn get_cached_size_with_length_delimiter(value: &Self::Value) -> u32 | [src] |
impl ProtobufType for ProtobufTypeInt32[src]
impl ProtobufType for ProtobufTypeInt32type Value = i32
fn wire_type() -> WireType | [src] |
fn read(is: &mut CodedInputStream) -> ProtobufResult<i32> | [src] |
fn compute_size(value: &i32) -> u32 | [src] |
fn write_with_cached_size( | [src] |
fn compute_size_with_length_delimiter(value: &Self::Value) -> u32 | [src] |
fn get_from_unknown(_unknown_values: &UnknownValues) -> Option<Self::Value> | [src] |
fn get_cached_size(value: &Self::Value) -> u32 | [src] |
fn get_cached_size_with_length_delimiter(value: &Self::Value) -> u32 | [src] |
impl ProtobufType for ProtobufTypeInt64[src]
impl ProtobufType for ProtobufTypeInt64type Value = i64
fn wire_type() -> WireType | [src] |
fn read(is: &mut CodedInputStream) -> ProtobufResult<i64> | [src] |
fn compute_size(value: &i64) -> u32 | [src] |
fn write_with_cached_size( | [src] |
fn compute_size_with_length_delimiter(value: &Self::Value) -> u32 | [src] |
fn get_from_unknown(_unknown_values: &UnknownValues) -> Option<Self::Value> | [src] |
fn get_cached_size(value: &Self::Value) -> u32 | [src] |
fn get_cached_size_with_length_delimiter(value: &Self::Value) -> u32 | [src] |
impl ProtobufType for ProtobufTypeSfixed32[src]
impl ProtobufType for ProtobufTypeSfixed32type Value = i32
fn wire_type() -> WireType | [src] |
fn read(is: &mut CodedInputStream) -> ProtobufResult<i32> | [src] |
fn compute_size(_value: &i32) -> u32 | [src] |
fn write_with_cached_size( | [src] |
fn compute_size_with_length_delimiter(value: &Self::Value) -> u32 | [src] |
fn get_from_unknown(_unknown_values: &UnknownValues) -> Option<Self::Value> | [src] |
fn get_cached_size(value: &Self::Value) -> u32 | [src] |
fn get_cached_size_with_length_delimiter(value: &Self::Value) -> u32 | [src] |
impl ProtobufType for ProtobufTypeSfixed64[src]
impl ProtobufType for ProtobufTypeSfixed64type Value = i64
fn wire_type() -> WireType | [src] |
fn read(is: &mut CodedInputStream) -> ProtobufResult<i64> | [src] |
fn compute_size(_value: &i64) -> u32 | [src] |
fn write_with_cached_size( | [src] |
fn compute_size_with_length_delimiter(value: &Self::Value) -> u32 | [src] |
fn get_from_unknown(_unknown_values: &UnknownValues) -> Option<Self::Value> | [src] |
fn get_cached_size(value: &Self::Value) -> u32 | [src] |
fn get_cached_size_with_length_delimiter(value: &Self::Value) -> u32 | [src] |
impl ProtobufType for ProtobufTypeSint32[src]
impl ProtobufType for ProtobufTypeSint32type Value = i32
fn wire_type() -> WireType | [src] |
fn read(is: &mut CodedInputStream) -> ProtobufResult<i32> | [src] |
fn compute_size(value: &i32) -> u32 | [src] |
fn write_with_cached_size( | [src] |
fn compute_size_with_length_delimiter(value: &Self::Value) -> u32 | [src] |
fn get_from_unknown(_unknown_values: &UnknownValues) -> Option<Self::Value> | [src] |
fn get_cached_size(value: &Self::Value) -> u32 | [src] |
fn get_cached_size_with_length_delimiter(value: &Self::Value) -> u32 | [src] |
impl ProtobufType for ProtobufTypeSint64[src]
impl ProtobufType for ProtobufTypeSint64type Value = i64
fn wire_type() -> WireType | [src] |
fn read(is: &mut CodedInputStream) -> ProtobufResult<i64> | [src] |
fn compute_size(value: &i64) -> u32 | [src] |
fn write_with_cached_size( | [src] |
fn compute_size_with_length_delimiter(value: &Self::Value) -> u32 | [src] |
fn get_from_unknown(_unknown_values: &UnknownValues) -> Option<Self::Value> | [src] |
fn get_cached_size(value: &Self::Value) -> u32 | [src] |
fn get_cached_size_with_length_delimiter(value: &Self::Value) -> u32 | [src] |
impl ProtobufType for ProtobufTypeString[src]
impl ProtobufType for ProtobufTypeStringtype Value = String
fn wire_type() -> WireType | [src] |
fn read(is: &mut CodedInputStream) -> ProtobufResult<String> | [src] |
fn compute_size(value: &String) -> u32 | [src] |
fn write_with_cached_size( | [src] |
fn compute_size_with_length_delimiter(value: &Self::Value) -> u32 | [src] |
fn get_from_unknown(_unknown_values: &UnknownValues) -> Option<Self::Value> | [src] |
fn get_cached_size(value: &Self::Value) -> u32 | [src] |
fn get_cached_size_with_length_delimiter(value: &Self::Value) -> u32 | [src] |
impl ProtobufType for ProtobufTypeUint32[src]
impl ProtobufType for ProtobufTypeUint32type Value = u32
fn wire_type() -> WireType | [src] |
fn read(is: &mut CodedInputStream) -> ProtobufResult<u32> | [src] |
fn compute_size(value: &u32) -> u32 | [src] |
fn write_with_cached_size( | [src] |
fn compute_size_with_length_delimiter(value: &Self::Value) -> u32 | [src] |
fn get_from_unknown(_unknown_values: &UnknownValues) -> Option<Self::Value> | [src] |
fn get_cached_size(value: &Self::Value) -> u32 | [src] |
fn get_cached_size_with_length_delimiter(value: &Self::Value) -> u32 | [src] |
impl ProtobufType for ProtobufTypeUint64[src]
impl ProtobufType for ProtobufTypeUint64type Value = u64
fn wire_type() -> WireType | [src] |
fn read(is: &mut CodedInputStream) -> ProtobufResult<u64> | [src] |
fn compute_size(value: &u64) -> u32 | [src] |
fn write_with_cached_size( | [src] |
fn compute_size_with_length_delimiter(value: &Self::Value) -> u32 | [src] |
fn get_from_unknown(_unknown_values: &UnknownValues) -> Option<Self::Value> | [src] |
fn get_cached_size(value: &Self::Value) -> u32 | [src] |
fn get_cached_size_with_length_delimiter(value: &Self::Value) -> u32 | [src] |
impl<E: ProtobufEnum + ProtobufValue> ProtobufType for ProtobufTypeEnum<E>[src]
impl<E: ProtobufEnum + ProtobufValue> ProtobufType for ProtobufTypeEnum<E>type Value = E
fn wire_type() -> WireType | [src] |
fn read(is: &mut CodedInputStream) -> ProtobufResult<E> | [src] |
fn compute_size(value: &E) -> u32 | [src] |
fn write_with_cached_size( | [src] |
fn compute_size_with_length_delimiter(value: &Self::Value) -> u32 | [src] |
fn get_from_unknown(_unknown_values: &UnknownValues) -> Option<Self::Value> | [src] |
fn get_cached_size(value: &Self::Value) -> u32 | [src] |
fn get_cached_size_with_length_delimiter(value: &Self::Value) -> u32 | [src] |
impl<M: Message + Clone + ProtobufValue> ProtobufType for ProtobufTypeMessage<M>[src]
impl<M: Message + Clone + ProtobufValue> ProtobufType for ProtobufTypeMessage<M>type Value = M
fn wire_type() -> WireType | [src] |
fn read(is: &mut CodedInputStream) -> ProtobufResult<M> | [src] |
fn compute_size(value: &M) -> u32 | [src] |
fn get_cached_size(value: &M) -> u32 | [src] |
fn write_with_cached_size( | [src] |
fn compute_size_with_length_delimiter(value: &Self::Value) -> u32 | [src] |
fn get_from_unknown(_unknown_values: &UnknownValues) -> Option<Self::Value> | [src] |
fn get_cached_size_with_length_delimiter(value: &Self::Value) -> u32 | [src] |