protobuf::types

Struct ProtobufTypeDouble

Source
pub struct ProtobufTypeDouble;
Expand description

double

Trait Implementations§

Source§

impl ProtobufType for ProtobufTypeDouble

Source§

type Value = f64

Rust type of value
Source§

fn wire_type() -> WireType

Wire type when writing to stream
Source§

fn read(is: &mut CodedInputStream<'_>) -> ProtobufResult<f64>

Read value from CodedInputStream
Source§

fn get_from_unknown(unknown_values: &UnknownValues) -> Option<f64>

Get value from UnknownValues
Source§

fn compute_size(_value: &f64) -> u32

Compute wire size
Source§

fn write_with_cached_size( field_number: u32, value: &f64, os: &mut CodedOutputStream<'_>, ) -> ProtobufResult<()>

Write a value with previously cached size
Source§

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)
Source§

fn get_cached_size(value: &Self::Value) -> u32

Get previously computed size
Source§

fn get_cached_size_with_length_delimiter(value: &Self::Value) -> u32

Get previously cached size with length prefix

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.