Trait protobuf::types::ProtobufType
[−]
[src]
pub trait ProtobufType {
type Value: ProtobufValue + Clone + 'static;
fn wire_type() -> WireType;
fn read(is: &mut CodedInputStream) -> ProtobufResult<Self::Value>;
fn compute_size(value: &Self::Value) -> u32;
fn write_with_cached_size<W>(field_number: u32,
value: &Self::Value,
os: &mut W)
-> ProtobufResult<()> where W: Write;
fn compute_size_with_length_delimiter(value: &Self::Value) -> u32 { ... }
fn get_cached_size(value: &Self::Value) -> u32 { ... }
fn get_cached_size_with_length_delimiter(value: &Self::Value) -> u32 { ... }
}
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<W>(field_number: u32,
value: &Self::Value,
os: &mut W)
-> ProtobufResult<()> where W: Write
value: &Self::Value,
os: &mut W)
-> ProtobufResult<()> where W: Write
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_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 ProtobufTypeFloatimpl ProtobufType for ProtobufTypeDoubleimpl ProtobufType for ProtobufTypeInt32impl ProtobufType for ProtobufTypeInt64impl ProtobufType for ProtobufTypeUint32impl ProtobufType for ProtobufTypeUint64impl ProtobufType for ProtobufTypeSint32impl ProtobufType for ProtobufTypeSint64impl ProtobufType for ProtobufTypeFixed32impl ProtobufType for ProtobufTypeFixed64impl ProtobufType for ProtobufTypeSfixed32impl ProtobufType for ProtobufTypeSfixed64impl ProtobufType for ProtobufTypeBoolimpl ProtobufType for ProtobufTypeStringimpl ProtobufType for ProtobufTypeBytesimpl<E: ProtobufEnum + ProtobufValue> ProtobufType for ProtobufTypeEnum<E>impl<M: Message + MessageStatic + ProtobufValue> ProtobufType for ProtobufTypeMessage<M>