pub struct LiveFileStorageInfoEntry<'a> { /* private fields */ }Expand description
One file in a LiveFilesStorageInfo listing.
Every string accessor borrows straight out of the parent listing: the C API
returns interior pointers into the std::strings it holds, so nothing is
copied or freed here.
Implementations§
Source§impl<'a> LiveFileStorageInfoEntry<'a>
impl<'a> LiveFileStorageInfoEntry<'a>
Sourcepub fn relative_filename(&self) -> &'a [u8] ⓘ
pub fn relative_filename(&self) -> &'a [u8] ⓘ
The file name within its directory, for example 123456.sst.
Sourcepub fn relative_filename_lossy(&self) -> Cow<'a, str>
pub fn relative_filename_lossy(&self) -> Cow<'a, str>
relative_filename as UTF-8, replacing
invalid sequences.
Sourcepub fn directory(&self) -> &'a [u8] ⓘ
pub fn directory(&self) -> &'a [u8] ⓘ
The directory holding the file, without a trailing /. This could be a
DB path, the WAL directory, and so on.
Sourcepub fn directory_lossy(&self) -> Cow<'a, str>
pub fn directory_lossy(&self) -> Cow<'a, str>
directory as UTF-8, replacing invalid sequences.
Sourcepub fn file_number(&self) -> u64
pub fn file_number(&self) -> u64
The file’s number within the DB, or 0 for files that have none, such
as CURRENT.
Sourcepub fn size(&self) -> u64
pub fn size(&self) -> u64
File size in bytes. See trim_to_size and
replacement_contents for when the file on
disk may differ.
Sourcepub fn trim_to_size(&self) -> bool
pub fn trim_to_size(&self) -> bool
When true the file on disk may be longer than size and
only the first size bytes belong in the copy. When false a length
mismatch means the file is corrupt.
Sourcepub fn replacement_contents(&self) -> &'a [u8] ⓘ
pub fn replacement_contents(&self) -> &'a [u8] ⓘ
Contents to write instead of reading the file from disk, used for
CURRENT. Empty means read the file on disk as usual; otherwise this is
exactly size bytes long.
Unlike the other borrowed strings this may contain NUL bytes, so it comes
from the length out-param rather than strlen.
Sourcepub fn file_checksum_func_name(&self) -> &'a [u8] ⓘ
pub fn file_checksum_func_name(&self) -> &'a [u8] ⓘ
Name of the checksum function that produced this file’s checksum.
Unknown when no checksum function is configured, empty when checksum
info was not requested.
Sourcepub fn file_checksum_func_name_lossy(&self) -> Cow<'a, str>
pub fn file_checksum_func_name_lossy(&self) -> Cow<'a, str>
file_checksum_func_name as UTF-8,
replacing invalid sequences.
Sourcepub fn temperature(&self) -> Temperature
pub fn temperature(&self) -> Temperature
The storage tier the file is placed on.
Trait Implementations§
Source§impl<'a> Clone for LiveFileStorageInfoEntry<'a>
impl<'a> Clone for LiveFileStorageInfoEntry<'a>
Source§fn clone(&self) -> LiveFileStorageInfoEntry<'a>
fn clone(&self) -> LiveFileStorageInfoEntry<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more