Trait mesh_protobuf::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