pub trait FieldPackHelper<'a, T: FieldType<'a>> {
// Required methods
fn field_pack_sz(&self, tag: &Tag) -> usize;
fn field_pack(&self, tag: &Tag, out: &mut [u8]);
}Expand description
A FieldPackHelper packs a tag and value in the provided space.
For option this may be zero. For vector this may be repeated instances of tag + the contents of the vector.
Required Methods§
Sourcefn field_pack_sz(&self, tag: &Tag) -> usize
fn field_pack_sz(&self, tag: &Tag) -> usize
The size of encoding self with tag.
Sourcefn field_pack(&self, tag: &Tag, out: &mut [u8])
fn field_pack(&self, tag: &Tag, out: &mut [u8])
Pack the tag into the output buffer.