[−][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]
type 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(
field_number: u32,
value: &bool,
os: &mut CodedOutputStream
) -> ProtobufResult<()>
[src]
field_number: u32,
value: &bool,
os: &mut CodedOutputStream
) -> ProtobufResult<()>
impl ProtobufType for ProtobufTypeBytes
[src]
type 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(
field_number: u32,
value: &Vec<u8>,
os: &mut CodedOutputStream
) -> ProtobufResult<()>
[src]
field_number: u32,
value: &Vec<u8>,
os: &mut CodedOutputStream
) -> ProtobufResult<()>
impl ProtobufType for ProtobufTypeDouble
[src]
type 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(
field_number: u32,
value: &f64,
os: &mut CodedOutputStream
) -> ProtobufResult<()>
[src]
field_number: u32,
value: &f64,
os: &mut CodedOutputStream
) -> ProtobufResult<()>
impl ProtobufType for ProtobufTypeFixed32
[src]
type 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(
field_number: u32,
value: &u32,
os: &mut CodedOutputStream
) -> ProtobufResult<()>
[src]
field_number: u32,
value: &u32,
os: &mut CodedOutputStream
) -> ProtobufResult<()>
impl ProtobufType for ProtobufTypeFixed64
[src]
type 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(
field_number: u32,
value: &u64,
os: &mut CodedOutputStream
) -> ProtobufResult<()>
[src]
field_number: u32,
value: &u64,
os: &mut CodedOutputStream
) -> ProtobufResult<()>
impl ProtobufType for ProtobufTypeFloat
[src]
type 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(
field_number: u32,
value: &f32,
os: &mut CodedOutputStream
) -> ProtobufResult<()>
[src]
field_number: u32,
value: &f32,
os: &mut CodedOutputStream
) -> ProtobufResult<()>
impl ProtobufType for ProtobufTypeInt32
[src]
type 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(
field_number: u32,
value: &i32,
os: &mut CodedOutputStream
) -> ProtobufResult<()>
[src]
field_number: u32,
value: &i32,
os: &mut CodedOutputStream
) -> ProtobufResult<()>
impl ProtobufType for ProtobufTypeInt64
[src]
type 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(
field_number: u32,
value: &i64,
os: &mut CodedOutputStream
) -> ProtobufResult<()>
[src]
field_number: u32,
value: &i64,
os: &mut CodedOutputStream
) -> ProtobufResult<()>
impl ProtobufType for ProtobufTypeSfixed32
[src]
type 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(
field_number: u32,
value: &i32,
os: &mut CodedOutputStream
) -> ProtobufResult<()>
[src]
field_number: u32,
value: &i32,
os: &mut CodedOutputStream
) -> ProtobufResult<()>
impl ProtobufType for ProtobufTypeSfixed64
[src]
type 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(
field_number: u32,
value: &i64,
os: &mut CodedOutputStream
) -> ProtobufResult<()>
[src]
field_number: u32,
value: &i64,
os: &mut CodedOutputStream
) -> ProtobufResult<()>
impl ProtobufType for ProtobufTypeSint32
[src]
type 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(
field_number: u32,
value: &i32,
os: &mut CodedOutputStream
) -> ProtobufResult<()>
[src]
field_number: u32,
value: &i32,
os: &mut CodedOutputStream
) -> ProtobufResult<()>
impl ProtobufType for ProtobufTypeSint64
[src]
type 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(
field_number: u32,
value: &i64,
os: &mut CodedOutputStream
) -> ProtobufResult<()>
[src]
field_number: u32,
value: &i64,
os: &mut CodedOutputStream
) -> ProtobufResult<()>
impl ProtobufType for ProtobufTypeString
[src]
type 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(
field_number: u32,
value: &String,
os: &mut CodedOutputStream
) -> ProtobufResult<()>
[src]
field_number: u32,
value: &String,
os: &mut CodedOutputStream
) -> ProtobufResult<()>
impl ProtobufType for ProtobufTypeUint32
[src]
type 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(
field_number: u32,
value: &u32,
os: &mut CodedOutputStream
) -> ProtobufResult<()>
[src]
field_number: u32,
value: &u32,
os: &mut CodedOutputStream
) -> ProtobufResult<()>
impl ProtobufType for ProtobufTypeUint64
[src]
type 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(
field_number: u32,
value: &u64,
os: &mut CodedOutputStream
) -> ProtobufResult<()>
[src]
field_number: u32,
value: &u64,
os: &mut CodedOutputStream
) -> ProtobufResult<()>
impl<E: ProtobufEnum + ProtobufValue> ProtobufType for ProtobufTypeEnum<E>
[src]
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(
field_number: u32,
value: &E,
os: &mut CodedOutputStream
) -> ProtobufResult<()>
[src]
field_number: u32,
value: &E,
os: &mut CodedOutputStream
) -> ProtobufResult<()>
impl<M: Message + MessageStatic + ProtobufValue> ProtobufType for ProtobufTypeMessage<M>
[src]
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(
field_number: u32,
value: &Self::Value,
os: &mut CodedOutputStream
) -> ProtobufResult<()>
[src]
field_number: u32,
value: &Self::Value,
os: &mut CodedOutputStream
) -> ProtobufResult<()>