pub enum DataType {
Show 21 variants
unit,
int32,
int64,
uint32,
uint64,
sint32,
sint64,
fixed32,
fixed64,
sfixed32,
sfixed64,
timestamp_micros,
float,
double,
Bool,
bytes,
bytes16,
bytes32,
bytes64,
string,
message,
}
Variants§
unit
int32
int64
uint32
uint64
sint32
sint64
fixed32
fixed64
sfixed32
sfixed64
timestamp_micros
float
double
Bool
bytes
bytes16
bytes32
bytes64
string
message
Implementations§
Trait Implementations§
source§impl<'prototk> FieldPackHelper<'prototk, message<DataType>> for DataType
impl<'prototk> FieldPackHelper<'prototk, message<DataType>> for DataType
source§fn field_pack_sz(&self, tag: &Tag) -> usize
fn field_pack_sz(&self, tag: &Tag) -> usize
The size of encoding self with tag.
source§fn field_pack(&self, tag: &Tag, out: &mut [u8])
fn field_pack(&self, tag: &Tag, out: &mut [u8])
Pack the tag into the output buffer.
source§impl<'prototk> FieldUnpackHelper<'prototk, message<DataType>> for DataType
impl<'prototk> FieldUnpackHelper<'prototk, message<DataType>> for DataType
source§fn merge_field(&mut self, proto: message<DataType>)
fn merge_field(&mut self, proto: message<DataType>)
Merge the proto into self.
source§impl From<KeyDataType> for DataType
impl From<KeyDataType> for DataType
source§fn from(ty: KeyDataType) -> Self
fn from(ty: KeyDataType) -> Self
Converts to this type from the input type.
source§impl Ord for DataType
impl Ord for DataType
source§impl Packable for DataType
impl Packable for DataType
source§fn pack_sz(&self) -> usize
fn pack_sz(&self) -> usize
pack_sz
returns the number of bytes required to serialize the Packable object.source§fn pack(&self, buf: &mut [u8])
fn pack(&self, buf: &mut [u8])
pack
fills in the buffer out
with the packed binary representation of the Packable
object. The implementor is responsible to ensure that out
is exactly pack_sz()
bytes
and implementations are encouraged to assert this. Read moresource§fn stream<W: Write>(&self, writer: &mut W) -> Result<usize, Error>
fn stream<W: Write>(&self, writer: &mut W) -> Result<usize, Error>
stream
writes the object to the provided writer using the same representation that would
be used in a call to pack
. The implementor is responsible for making sure that the
number of bytes written is exactly equal to the number of required bytes. Read moresource§impl PartialEq for DataType
impl PartialEq for DataType
source§impl PartialOrd for DataType
impl PartialOrd for DataType
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl<'prototk> Unpackable<'prototk> for DataType
impl<'prototk> Unpackable<'prototk> for DataType
impl Copy for DataType
impl Eq for DataType
impl<'prototk> Message<'prototk> for DataType
impl StructuralPartialEq for DataType
Auto Trait Implementations§
impl RefUnwindSafe for DataType
impl Send for DataType
impl Sync for DataType
impl Unpin for DataType
impl UnwindSafe for DataType
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more