pub struct ArchiveHeader {
pub name: String,
pub file_code: FourCC,
pub creator_code: FourCC,
pub finder_flags: FinderFlags,
pub data_len: u32,
pub resource_len: u32,
pub header_checksum: u16,
}Expand description
On-disk structure describing contents of the BinHex archive
Fields§
§name: StringOriginal name of the embedded file
file_code: FourCCFour-byte type code for the embedded file
creator_code: FourCCFour-byte identifier for the program that created the file
finder_flags: FinderFlagsFinder flags as observed at the time of compression
data_len: u32Number of bytes in the uncompressed data fork
resource_len: u32Number of bytes in the uncompressed resource fork
header_checksum: u16CRC-16 checksum of the header bytes
The CRC-16 configuration is CRC-16-XMODEM the CRC of ASCII “123456789” is 0x31C3.
Implementations§
Source§impl ArchiveHeader
impl ArchiveHeader
Sourcepub const FIXED_SIZE: usize = 22
pub const FIXED_SIZE: usize = 22
Fixed size of the header on disk
Trait Implementations§
Source§impl BinRead for ArchiveHeader
impl BinRead for ArchiveHeader
Source§fn read_options<R: Read + Seek>(
__binrw_generated_var_reader: &mut R,
__binrw_generated_var_endian: Endian,
__binrw_generated_var_arguments: Self::Args<'_>,
) -> BinResult<Self>
fn read_options<R: Read + Seek>( __binrw_generated_var_reader: &mut R, __binrw_generated_var_endian: Endian, __binrw_generated_var_arguments: Self::Args<'_>, ) -> BinResult<Self>
Source§fn read<R>(reader: &mut R) -> Result<Self, Error>
fn read<R>(reader: &mut R) -> Result<Self, Error>
Read
Self from the reader using default arguments. Read moreSource§fn read_be<R>(reader: &mut R) -> Result<Self, Error>
fn read_be<R>(reader: &mut R) -> Result<Self, Error>
Read
Self from the reader using default arguments and assuming
big-endian byte order. Read moreSource§fn read_le<R>(reader: &mut R) -> Result<Self, Error>
fn read_le<R>(reader: &mut R) -> Result<Self, Error>
Read
Self from the reader using default arguments and assuming
little-endian byte order. Read moreSource§fn read_ne<R>(reader: &mut R) -> Result<Self, Error>
fn read_ne<R>(reader: &mut R) -> Result<Self, Error>
Read
T from the reader assuming native-endian byte order. Read moreSource§fn read_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
fn read_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
Read
Self from the reader using the given arguments. Read moreSource§fn read_be_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
fn read_be_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
Read
Self from the reader, assuming big-endian byte order, using the
given arguments. Read moreSource§impl Clone for ArchiveHeader
impl Clone for ArchiveHeader
Source§fn clone(&self) -> ArchiveHeader
fn clone(&self) -> ArchiveHeader
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ArchiveHeader
impl Debug for ArchiveHeader
Source§impl ReadEndian for ArchiveHeader
impl ReadEndian for ArchiveHeader
Source§const ENDIAN: EndianKind
const ENDIAN: EndianKind
The endianness of the type.
Auto Trait Implementations§
impl Freeze for ArchiveHeader
impl RefUnwindSafe for ArchiveHeader
impl Send for ArchiveHeader
impl Sync for ArchiveHeader
impl Unpin for ArchiveHeader
impl UnsafeUnpin for ArchiveHeader
impl UnwindSafe for ArchiveHeader
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more