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: u8File format version
name: StringOriginal file name
type_code: FourCCMacintosh file type code
creator_code: FourCCMacintosh creator code
finder_flags_upper: u8Upper 8-bit of the finder flags
position: PointPosition in parent window
window_id: u16Id of parent window
flags: Flags§data_fork_len: u32Number of bytes in data fork
resource_fork_len: u32Number of bytes in resource fork
created_at: DateTime<Utc>§modified_at: DateTime<Utc>§comment_len: u16Length of file comment
finder_flags_lower: u8Lower 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: u16xmodem crc 16
Implementations§
Source§impl Header
impl Header
pub const FIXED_SIZE: usize = 128
pub fn data_fork_location(&self) -> u64
pub fn resource_fork_location(&self) -> u64
pub fn file_comment_location(&self) -> u64
Trait Implementations§
Source§impl BinRead for Header
impl BinRead for Header
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 ReadEndian for Header
impl ReadEndian for Header
Source§const ENDIAN: EndianKind
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> 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