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§
Sourcefn try_parse(data: &[u8]) -> Result<Self, Error>where
Self: Sized,
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.
Sourcefn set_vendor(&mut self, vendor: &str)
fn set_vendor(&mut self, vendor: &str)
Sets the vendor field.
Sourcefn to_discrete_comment_list(&self) -> DiscreteCommentList
fn to_discrete_comment_list(&self) -> DiscreteCommentList
Returns the comments in the header as a DiscreteCommentList.
Sourcefn get_vendor(&self) -> &str
fn get_vendor(&self) -> &str
Gets the vendor field.
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.