Trait AttributeWrite

Source
pub trait AttributeWrite: Attribute {
    // Required methods
    fn write_into_unchecked(&self, dest: &mut [u8]);
    fn to_raw(&self) -> RawAttribute<'_>;
}
Expand description

Trait required when implementing writing an Attribute to a sequence of bytes

Required Methods§

Source

fn write_into_unchecked(&self, dest: &mut [u8])

Write the 4 byte attribute header into the provided destination buffer returning the number of bytes written.

Panics if the destination buffer is not large enough

Source

fn to_raw(&self) -> RawAttribute<'_>

Produce a RawAttribute from this Attribute

Implementors§