Struct box_format::FileRecord
source · [−]pub struct FileRecord {
pub compression: Compression,
pub length: u64,
pub decompressed_length: u64,
pub data: NonZeroU64,
pub name: String,
pub attrs: AttrMap,
}
Fields
compression: Compression
a bytestring representing the type of compression being used, always 8 bytes.
length: u64
The exact length of the data as written, ignoring any padding.
decompressed_length: u64
A hint for the size of the content when decompressed. Do not trust in absolute terms.
data: NonZeroU64
The position of the data in the file
name: String
The name of the file
attrs: AttrMap
Optional attributes for the given paths, such as Windows or Unix ACLs, last accessed time, etc.
Implementations
sourceimpl FileRecord
impl FileRecord
pub fn compression(&self) -> Compression
pub fn attr<S: AsRef<str>>(
&self,
metadata: &BoxMetadata,
key: S
) -> Option<&[u8]>
pub fn upcast(self) -> Record
Trait Implementations
sourceimpl Clone for FileRecord
impl Clone for FileRecord
sourcefn clone(&self) -> FileRecord
fn clone(&self) -> FileRecord
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl RefUnwindSafe for FileRecord
impl Send for FileRecord
impl Sync for FileRecord
impl Unpin for FileRecord
impl UnwindSafe for FileRecord
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more