Skip to main content

MacArchiveKind

Enum MacArchiveKind 

Source
pub enum MacArchiveKind {
    BinHexSingleFile,
    BinHexOverSit,
    BinHexOverSea,
    Sit,
    Sit5,
    Sea,
    CompactPro,
    BinHexOverCompactPro,
    Mar,
    MacBinary,
    MacZip,
}
Expand description

What kind of Mac archive a byte buffer is, if any.

Variants§

§

BinHexSingleFile

A .hqx whose decoded payload is one Mac file (not a SIT/SEA). Carries data fork + resource fork + Finder info (type, creator, flags). The Workflow A modal asks the user whether to “Convert to binary” (decode the HQX and add the inner file) or add as-is.

§

BinHexOverSit

A .sit.hqx: BinHex-wrapped classic StuffIt or StuffIt 5 archive. The Workflow A modal offers three actions (convert and expand / convert only / add as-is).

§

BinHexOverSea

A .sea.hqx: BinHex-wrapped self-extracting StuffIt archive. Same three-action shape as [BinHexOverSit].

§

Sit

A classic StuffIt archive (SIT! magic).

§

Sit5

A StuffIt 5 archive.

§

Sea

A self-extracting StuffIt archive: a Mac application carrying a SIT! signature inside its data fork.

§

CompactPro

A Compact Pro archive (.cpt, or a .sea self-extracting one). The 0x01 marker plus a CRC-validated index identify it.

§

BinHexOverCompactPro

A .cpt.hqx / .sea.hqx: BinHex-wrapped Compact Pro archive.

§

Mar

A mar archive (.mar, MAR\x80 magic) — a single Mac file or folder tree. Only the stored (unwrapped) form is recognized here.

§

MacBinary

A MacBinary I/II/III file (.bin): a transport wrapper holding one Mac file’s two forks plus Finder info. Content-detected (it has no reliable extension), so a raw .bin disk image stays a disk image.

§

MacZip

A MacZip archive (.zip): Info-ZIP’s Macintosh port stores each Mac file’s data fork as a normal ZIP entry and its resource fork under a XtraStuf.mac/ component, with Finder info in a Mac3 extra field. Content-detected (presence of a Mac3 field), so a plain disk-image-in-a-zip stays a disk image.

Implementations§

Source§

impl MacArchiveKind

Source

pub fn label(self) -> &'static str

Short label suitable for log messages and dialog titles (“BinHex 4.0”, “StuffIt”, “StuffIt 5”, “SEA”, “StuffIt-over-BinHex”, “SEA-over-BinHex”).

Source

pub fn is_binhex_wrapped(self) -> bool

True iff the kind has a BinHex outer wrapper (i.e. would benefit from a “Convert” action that strips the wrapper).

Source

pub fn is_multi_file(self) -> bool

True iff the kind has a multi-file archive payload (SIT / SIT5 / SEA, possibly wrapped in BinHex). The opposite case is a BinHexSingleFile, which only ever holds one file.

Trait Implementations§

Source§

impl Clone for MacArchiveKind

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for MacArchiveKind

Source§

impl Debug for MacArchiveKind

Source§

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

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

impl Eq for MacArchiveKind

Source§

impl PartialEq for MacArchiveKind

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for MacArchiveKind

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.