Trait mesh::payload::PackedDecode

source ·
pub trait PackedDecode<'a, T, C> {
    // Required methods
    fn read_packed(
        &self,
        data: &mut C,
        reader: &mut PackedReader<'a>,
    ) -> Result<(), Error>;
    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<(), Error>

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> PackedDecode<'_, u8, C> for ByteField
where C: CopyExtend<u8>,

source§

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

source§

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

source§

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

source§

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