Skip to main content

SourceVolumeSnapshot

Struct SourceVolumeSnapshot 

Source
pub struct SourceVolumeSnapshot {
Show 16 fields pub label: String, pub signature: u16, pub attributes: u32, pub create_date: u32, pub modify_date: u32, pub backup_date: u32, pub checked_date: u32, pub finder_info: [u32; 8], pub block_size: u32, pub total_blocks: u32, pub file_count: u32, pub folder_count: u32, pub boot_blocks: [u8; 1024], pub catalog_total_blocks: u32, pub extents_total_blocks: u32, pub attributes_total_blocks: u32,
}
Expand description

Volume-level metadata captured from the source.

Fields§

§label: String

Volume label (decoded UTF-8 of the root folder key name).

§signature: u16

0x482B (HFS+) or 0x4858 (HFSX). Preserved so the target can be re-formatted with the same case-sensitivity behavior.

§attributes: u32

VH attributes word — clone needs this for the journaled bit, the case-sensitivity bit (HFSX), and a few low-level flags.

§create_date: u32§modify_date: u32§backup_date: u32§checked_date: u32§finder_info: [u32; 8]

8 × u32 Finder info. finder_info[0] is the blessed System Folder CNID; other slots are copied verbatim with any CNID remap applied by the caller in Step 21.

§block_size: u32

Source allocation block size (informational — clone may pick a different block size on the target).

§total_blocks: u32

Source total allocation blocks (informational).

§file_count: u32§folder_count: u32§boot_blocks: [u8; 1024]

First 1024 bytes of the partition. Always zero on macOS-formatted volumes; copied verbatim by clone for round-trip parity.

§catalog_total_blocks: u32

Source vh.catalog_file.total_blocks. The streamed defrag planner uses this (with a safety margin) to size the target’s catalog B-tree so leaf splits don’t run out of free nodes mid-emit.

§extents_total_blocks: u32

Source vh.extents_file.total_blocks. Inherited as a ceiling for the target’s extents-overflow file size; the streamed target packs files contiguously and typically needs less.

§attributes_total_blocks: u32

Source vh.attributes_file.total_blocks. Zero on volumes without xattrs; non-zero values flow through to the target’s attributes B-tree allocation.

Implementations§

Source§

impl SourceVolumeSnapshot

Source

pub fn capture<R: Read + Seek>( fs: &mut HfsPlusFilesystem<R>, ) -> Result<Self, FilesystemError>

Capture volume-level metadata from an opened source filesystem. The source is read but never mutated.

Trait Implementations§

Source§

impl Clone for SourceVolumeSnapshot

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 Debug for SourceVolumeSnapshot

Source§

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

Formats the value using the given formatter. Read more

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.