Skip to main content

Header

Struct Header 

Source
pub struct Header {
Show 22 fields pub version: u8, pub name: String, pub type_code: FourCC, pub creator_code: FourCC, pub finder_flags_upper: u8, pub position: Point, pub window_id: u16, pub flags: Flags, pub data_fork_len: u32, pub resource_fork_len: u32, pub created_at: DateTime<Utc>, pub modified_at: DateTime<Utc>, pub comment_len: u16, pub finder_flags_lower: u8, pub magic: FourCC, pub file_name_script: u8, pub extended_finder_flags: u8, pub unpacked_total_len: u32, pub extended_header_len: u16, pub uploader_version: u8, pub downloader_min_version: u8, pub checksum: u16,
}
Expand description

MacBinary file header

Fields§

§version: u8

File format version

§name: String

Original file name

§type_code: FourCC

Macintosh file type code

§creator_code: FourCC

Macintosh creator code

§finder_flags_upper: u8

Upper 8-bit of the finder flags

§position: Point

Position in parent window

§window_id: u16

Id of parent window

§flags: Flags§data_fork_len: u32

Number of bytes in data fork

§resource_fork_len: u32

Number of bytes in resource fork

§created_at: DateTime<Utc>§modified_at: DateTime<Utc>§comment_len: u16

Length of file comment

§finder_flags_lower: u8

Lower 8bits of finder flags

§magic: FourCC§file_name_script: u8§extended_finder_flags: u8§unpacked_total_len: u32§extended_header_len: u16§uploader_version: u8§downloader_min_version: u8§checksum: u16

xmodem crc 16

Implementations§

Trait Implementations§

Source§

impl BinRead for Header

Source§

type Args<'__binrw_generated_args_lifetime> = ()

The type used for the args parameter of read_args() and read_options(). Read more
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>

Read Self from the reader using the given Endian and arguments. Read more
Source§

fn read<R>(reader: &mut R) -> Result<Self, Error>
where R: Read + Seek, Self: ReadEndian, Self::Args<'a>: for<'a> Required,

Read Self from the reader using default arguments. Read more
Source§

fn read_be<R>(reader: &mut R) -> Result<Self, Error>
where R: Read + Seek, Self::Args<'a>: for<'a> Required,

Read Self from the reader using default arguments and assuming big-endian byte order. Read more
Source§

fn read_le<R>(reader: &mut R) -> Result<Self, Error>
where R: Read + Seek, Self::Args<'a>: for<'a> Required,

Read Self from the reader using default arguments and assuming little-endian byte order. Read more
Source§

fn read_ne<R>(reader: &mut R) -> Result<Self, Error>
where R: Read + Seek, Self::Args<'a>: for<'a> Required,

Read T from the reader assuming native-endian byte order. Read more
Source§

fn read_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
where R: Read + Seek, Self: ReadEndian,

Read Self from the reader using the given arguments. Read more
Source§

fn read_be_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
where R: Read + Seek,

Read Self from the reader, assuming big-endian byte order, using the given arguments. Read more
Source§

fn read_le_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
where R: Read + Seek,

Read Self from the reader, assuming little-endian byte order, using the given arguments. Read more
Source§

fn read_ne_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
where R: Read + Seek,

Read T from the reader, assuming native-endian byte order, using the given arguments. Read more
Source§

impl Debug for Header

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl ReadEndian for Header

Source§

const ENDIAN: EndianKind

The endianness of the type.

Auto Trait Implementations§

§

impl Freeze for Header

§

impl RefUnwindSafe for Header

§

impl Send for Header

§

impl Sync for Header

§

impl Unpin for Header

§

impl UnwindSafe for Header

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.