CommentHeader

Trait CommentHeader 

Source
pub trait CommentHeader: CommentList {
    // Required methods
    fn try_parse(data: &[u8]) -> Result<Self, Error>
       where Self: Sized;
    fn set_vendor(&mut self, vendor: &str);
    fn to_discrete_comment_list(&self) -> DiscreteCommentList;
    fn get_vendor(&self) -> &str;
    fn serialize_into<W: Write>(&self, writer: &mut W) -> Result<(), Error>;
}
Expand description

Trait for codec comment headers

Required Methods§

Source

fn try_parse(data: &[u8]) -> Result<Self, Error>
where Self: Sized,

Attempts to parse the supplied slice as a comment header. An error is returned if the header is believed to be corrupt, otherwise the parsed header is returned.

Source

fn set_vendor(&mut self, vendor: &str)

Sets the vendor field.

Source

fn to_discrete_comment_list(&self) -> DiscreteCommentList

Returns the comments in the header as a DiscreteCommentList.

Source

fn get_vendor(&self) -> &str

Gets the vendor field.

Source

fn serialize_into<W: Write>(&self, writer: &mut W) -> Result<(), Error>

Writes the serialized header

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§