SqshConfig

Struct SqshConfig 

Source
#[repr(C)]
pub struct SqshConfig { pub archive_offset: u64, pub source_size: u64, pub source_mapper: *const SqshMemoryMapperImpl, pub mapper_block_size: c_int, pub mapper_lru_size: c_int, pub compression_lru_size: c_int, pub max_symlink_depth: usize, pub _reserved: [c_char; 128], }
Expand description

The SqshConfig struct contains all the configuration options for a sqsh session.

Fields§

§archive_offset: u64

represents the offset in bytes where the sqsh_archive will start.

§source_size: u64

represents the addressable size of the source in bytes.

Please note that this is not the size of the archive, but the size of the source. So that the maximal size of the archive is source_size - archive_offset.

This field is only used when the source_mapper is unable to determine the size of the source itself. This is the case for the following mappers:

  • sqsh_mapper_impl_static
§source_mapper: *const SqshMemoryMapperImpl

source_mapper is the memory mapper implementation that will be used to map the archive.

  • sqsh_mapper_impl_mmap: the archive will be loaded from a file. The source will be interpreted as a file path. this is the default.
  • sqsh_mapper_impl_static: the archive will be interpreted from a static buffer.
  • sqsh_mapper_impl_curl: the archive will be loaded from a remote location. The source will be interpreted as a URL.
§mapper_block_size: c_int

the block size used to retrieve chunks of data from the mapper. If unset or 0, the block size will be determined by the mapper.

§mapper_lru_size: c_int

the size of the LRU cache used to cache chunks of data from the mapper. If unset or 0, the LRU defaults to 32. if set to -1, the LRU will be disabled.

§compression_lru_size: c_int

the size of the LRU cache used to cache chunks of data from the compression algorithm. If unset or 0, the LRU defaults to 128. if set to -1, the LRU will be disabled.

§max_symlink_depth: usize

the maximum depth of symlinks that will be followed. If unset or 0, the max symlink depth will be 100.

§_reserved: [c_char; 128]
PRIVATE

Trait Implementations§

Source§

impl Clone for SqshConfig

Source§

fn clone(&self) -> SqshConfig

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for SqshConfig

Source§

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

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

impl Copy for SqshConfig

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 = 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.