pub struct SnapshotInfo {Show 18 fields
pub version: u32,
pub block_size: u32,
pub compression: CompressionType,
pub encrypted: bool,
pub parent_path: Option<String>,
pub has_disk: bool,
pub has_memory: bool,
pub variable_blocks: bool,
pub disk_size: u64,
pub memory_size: u64,
pub file_size: u64,
pub index_offset: u64,
pub disk_pages: usize,
pub memory_pages: usize,
pub signature_present: bool,
pub dictionary_present: bool,
pub metadata_offset: Option<u64>,
pub metadata_length: Option<u32>,
}Expand description
Metadata extracted from a snapshot file.
Fields§
§version: u32§block_size: u32§compression: CompressionType§encrypted: bool§parent_path: Option<String>§has_disk: bool§has_memory: bool§variable_blocks: bool§disk_size: u64§memory_size: u64§file_size: u64§index_offset: u64§disk_pages: usize§memory_pages: usize§signature_present: bool§dictionary_present: bool§metadata_offset: Option<u64>§metadata_length: Option<u32>Implementations§
Source§impl SnapshotInfo
impl SnapshotInfo
Sourcepub fn total_uncompressed(&self) -> u64
pub fn total_uncompressed(&self) -> u64
Total uncompressed size (disk + memory).
Sourcepub fn compression_ratio(&self) -> f64
pub fn compression_ratio(&self) -> f64
Compression ratio (uncompressed / file size).
Auto Trait Implementations§
impl Freeze for SnapshotInfo
impl RefUnwindSafe for SnapshotInfo
impl Send for SnapshotInfo
impl Sync for SnapshotInfo
impl Unpin for SnapshotInfo
impl UnsafeUnpin for SnapshotInfo
impl UnwindSafe for SnapshotInfo
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
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>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more