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§
Sourcefn write_into_unchecked(&self, dest: &mut [u8])
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
Sourcefn to_raw(&self) -> RawAttribute<'_>
fn to_raw(&self) -> RawAttribute<'_>
Produce a RawAttribute from this Attribute