mesh_protobuf

Trait PackedDecode

Source
pub trait PackedDecode<'a, T, C> {
    // Required methods
    fn read_packed(
        &self,
        data: &mut C,
        reader: &mut PackedReader<'a>,
    ) -> Result<()>;
    fn must_pack(&self) -> bool;
}
Expand description

Methods for decoding a packed field.

Required Methods§

Source

fn read_packed(&self, data: &mut C, reader: &mut PackedReader<'a>) -> Result<()>

Reads from the packed format into data.

Source

fn must_pack(&self) -> bool

If true, when this type is decoded as part of a sequence, it must be done with read_packed and not the field methods.

Implementors§

Source§

impl<C: CopyExtend<u8>> PackedDecode<'_, u8, C> for ByteField

Source§

impl<T: FixedNumber<Type = u32>, C: CopyExtend<T>> PackedDecode<'_, T, C> for Fixed32Field

Source§

impl<T: FixedNumber<Type = u64>, C: CopyExtend<T>> PackedDecode<'_, T, C> for Fixed64Field

Source§

impl<T: FromNumber, C: CopyExtend<T>> PackedDecode<'_, T, C> for SignedVarintField

Source§

impl<T: FromNumber, C: CopyExtend<T>> PackedDecode<'_, T, C> for VarintField