Trait Parse

Source
pub trait Parse {
    type Error;

    // Required methods
    fn from_buf<T: Buf>(buf: &mut T) -> Result<Self, Self::Error>
       where Self: Sized;
    fn to_buf<T: BufMut>(&self, buf: &mut T) -> Result<(), Self::Error>;
}

Required Associated Types§

Required Methods§

Source

fn from_buf<T: Buf>(buf: &mut T) -> Result<Self, Self::Error>
where Self: Sized,

parsing this Type from a buf, returning either the Type or an Error. implementations must not modify the buf in case of an error.

Source

fn to_buf<T: BufMut>(&self, buf: &mut T) -> Result<(), Self::Error>

writing self to a buffer. implementation must not modify the buf in case of an error.

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§

Source§

impl Parse for ArchiveExtraDataRecord

Source§

impl Parse for ArchiveExtraDataRecordFixed

Source§

impl Parse for CentralDirectoryHeader

Source§

impl Parse for CentralDirectoryHeaderFixed

Source§

impl Parse for DataDescriptor

Source§

impl Parse for DataDescriptorSignature

Source§

impl Parse for DataDescriptorZip64

Source§

impl Parse for DataDescriptorZip64Signature

Source§

impl Parse for DigitalSignature

Source§

impl Parse for DigitalSignatureFixed

Source§

impl Parse for EndOfCentralDirectory

Source§

impl Parse for EndOfCentralDirectoryFixed

Source§

impl Parse for ExtensibleData

Source§

impl Parse for ExtensibleDataFixed

Source§

impl Parse for LocalFileHeader

Source§

impl Parse for LocalFileHeaderFixed

Source§

impl Parse for Zip64EndOfCentralDirectory

Source§

impl Parse for Zip64EndOfCentralDirectoryFixed

Source§

impl Parse for Zip64EndOfCentralDirectoryLocator