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 ProtobufTypeFloat
impl ProtobufType for ProtobufTypeDouble
impl ProtobufType for ProtobufTypeInt32
impl ProtobufType for ProtobufTypeInt64
impl ProtobufType for ProtobufTypeUint32
impl ProtobufType for ProtobufTypeUint64
impl ProtobufType for ProtobufTypeSint32
impl ProtobufType for ProtobufTypeSint64
impl ProtobufType for ProtobufTypeFixed32
impl ProtobufType for ProtobufTypeFixed64
impl ProtobufType for ProtobufTypeSfixed32
impl ProtobufType for ProtobufTypeSfixed64
impl ProtobufType for ProtobufTypeBool
impl ProtobufType for ProtobufTypeString
impl ProtobufType for ProtobufTypeBytes
impl<E: ProtobufEnum + ProtobufValue> ProtobufType for ProtobufTypeEnum<E>
impl<M: Message + MessageStatic + ProtobufValue> ProtobufType for ProtobufTypeMessage<M>