Struct backhand::SuperBlock
source · pub struct SuperBlock {Show 19 fields
pub magic: [u8; 4],
pub inode_count: u32,
pub mod_time: u32,
pub block_size: u32,
pub frag_count: u32,
pub compressor: Compressor,
pub block_log: u16,
pub flags: u16,
pub id_count: u16,
pub version_major: u16,
pub version_minor: u16,
pub root_inode: u64,
pub bytes_used: u64,
pub id_table: u64,
pub xattr_table: u64,
pub inode_table: u64,
pub dir_table: u64,
pub frag_table: u64,
pub export_table: u64,
}Expand description
Contains important information about the archive, including the locations of other sections
Fields§
§magic: [u8; 4]Must be set to 0x73717368 (“hsqs” on disk).
inode_count: u32The number of inodes stored in the archive.
mod_time: u32Last modification time of the archive. Count seconds since 00:00, Jan 1st 1970 UTC (not counting leap seconds). This is unsigned, so it expires in the year 2106 (as opposed to 2038).
block_size: u32The size of a data block in bytes. Must be a power of two between 4096 (4k) and 1048576 (1 MiB).
frag_count: u32The number of entries in the fragment table.
compressor: CompressorCompressor used for data
block_log: u16The log2 of the block size. If the two fields do not agree, the archive is considered corrupted.
flags: u16Bit wise OR of the flag bits
id_count: u16The number of entries in the ID lookup table.
version_major: u16Major version of the format. Must be set to 4.
version_minor: u16Minor version of the format. Must be set to 0.
root_inode: u64A reference to the inode of the root directory.
bytes_used: u64The number of bytes used by the archive. Because SquashFS archives must be padded to a multiple of the underlying device block size, this can be less than the actual file size.
id_table: u64§xattr_table: u64§inode_table: u64§dir_table: u64§frag_table: u64§export_table: u64Implementations§
source§impl SuperBlock
impl SuperBlock
sourcepub fn inodes_uncompressed(&self) -> bool
pub fn inodes_uncompressed(&self) -> bool
flag value
sourcepub fn data_block_stored_uncompressed(&self) -> bool
pub fn data_block_stored_uncompressed(&self) -> bool
flag value
sourcepub fn fragments_stored_uncompressed(&self) -> bool
pub fn fragments_stored_uncompressed(&self) -> bool
flag value
sourcepub fn fragments_are_not_used(&self) -> bool
pub fn fragments_are_not_used(&self) -> bool
flag value
sourcepub fn fragments_are_always_generated(&self) -> bool
pub fn fragments_are_always_generated(&self) -> bool
flag value
sourcepub fn data_has_been_duplicated(&self) -> bool
pub fn data_has_been_duplicated(&self) -> bool
flag value
sourcepub fn nfs_export_table_exists(&self) -> bool
pub fn nfs_export_table_exists(&self) -> bool
flag value
sourcepub fn xattrs_are_stored_uncompressed(&self) -> bool
pub fn xattrs_are_stored_uncompressed(&self) -> bool
flag value
sourcepub fn no_xattrs_in_archive(&self) -> bool
pub fn no_xattrs_in_archive(&self) -> bool
flag value
sourcepub fn compressor_options_are_present(&self) -> bool
pub fn compressor_options_are_present(&self) -> bool
flag value
source§impl SuperBlock
impl SuperBlock
pub fn new(compressor: Compressor, kind: Kind) -> Self
Trait Implementations§
source§impl Clone for SuperBlock
impl Clone for SuperBlock
source§fn clone(&self) -> SuperBlock
fn clone(&self) -> SuperBlock
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for SuperBlock
impl Debug for SuperBlock
source§impl DekuUpdate for SuperBlock
impl DekuUpdate for SuperBlock
source§impl PartialEq for SuperBlock
impl PartialEq for SuperBlock
source§fn eq(&self, other: &SuperBlock) -> bool
fn eq(&self, other: &SuperBlock) -> bool
self and other values to be equal, and is used
by ==.impl Copy for SuperBlock
impl Eq for SuperBlock
impl StructuralEq for SuperBlock
impl StructuralPartialEq for SuperBlock
Auto Trait Implementations§
impl RefUnwindSafe for SuperBlock
impl Send for SuperBlock
impl Sync for SuperBlock
impl Unpin for SuperBlock
impl UnwindSafe for SuperBlock
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
§impl<T> Conv for T
impl<T> Conv for T
§impl<T> FmtForward for T
impl<T> FmtForward for T
§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read more§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read more§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R ) -> R
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.§impl<T> Tap for T
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read more§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.