pub struct fixed32(pub u32);Expand description
fixed32 corresponds to the protobuf type of the same name. It’s an unsigned 32-bit integer represented as a little-endian unsigned integer.
Tuple Fields§
§0: u32Trait Implementations§
Source§impl FieldPackHelper<'_, fixed32> for u32
impl FieldPackHelper<'_, fixed32> for u32
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 FieldType<'_> for fixed32
impl FieldType<'_> for fixed32
Source§fn from_native(x: Self::Native) -> Self
fn from_native(x: Self::Native) -> Self
Convert the native value into an instance of Self.
Source§fn into_native(self) -> Self::Native
fn into_native(self) -> Self::Native
Convert an instance of self into a native type.
Source§fn field_packer<'b, F: FieldPackHelper<'a, Self>>(
field_number: FieldNumber,
field_value: &'b F,
) -> FieldPacker<'a, 'b, Self, F>
fn field_packer<'b, F: FieldPackHelper<'a, Self>>( field_number: FieldNumber, field_value: &'b F, ) -> FieldPacker<'a, 'b, Self, F>
Return a field packer for a field number and given field_value.
Source§impl FieldUnpackHelper<'_, fixed32> for u32
impl FieldUnpackHelper<'_, fixed32> for u32
Source§fn merge_field(&mut self, proto: fixed32)
fn merge_field(&mut self, proto: fixed32)
Merge the proto into self.
Source§impl Packable for fixed32
impl Packable for fixed32
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, out: &mut [u8])
fn pack(&self, out: &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>(&self, writer: &mut W) -> Result<usize, Error>
fn stream<W>(&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<'a> Unpackable<'a> for fixed32
impl<'a> Unpackable<'a> for fixed32
Auto Trait Implementations§
impl Freeze for fixed32
impl RefUnwindSafe for fixed32
impl Send for fixed32
impl Sync for fixed32
impl Unpin for fixed32
impl UnwindSafe for fixed32
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