pub struct WriteArtifact {
pub bytes: Vec<u8>,
pub merkle_root: ManifestRoot,
pub slabs: Vec<SlabArtifact>,
pub metadata_sidecar: Option<MetadataSidecar>,
pub inode_count: usize,
pub file_count: usize,
pub dir_count: usize,
pub drop_count: usize,
pub root_inode_number: u64,
}Expand description
Result of writing a directory tree.
Fields§
§bytes: Vec<u8>§merkle_root: ManifestRoot§slabs: Vec<SlabArtifact>All slabs produced by the writer, in slab-ordinal order. Empty
when the source tree had no files > INLINE_THRESHOLD.
metadata_sidecar: Option<MetadataSidecar>External metadata sidecar, present when the metadata blob
exceeds METADATA_EXTERNALIZE_THRESHOLD. None means the
metadata is inlined in the manifest.
inode_count: usize§file_count: usize§dir_count: usize§drop_count: usize§root_inode_number: u64Inode number of the root directory (i.e. the inode that represents the source directory itself, not a child of it). Always a directory and always referenced by the inlined metadata blob’s directory inode table.
Implementations§
Source§impl WriteArtifact
impl WriteArtifact
Sourcepub fn slab_bytes(&self) -> Option<&[u8]>
pub fn slab_bytes(&self) -> Option<&[u8]>
Convenience accessor for the single-slab case. Returns the
first slab’s bytes if there is exactly one slab, else None.
Modern callers should iterate WriteArtifact::slabs directly.
Sourcepub fn slab_locator(&self) -> Option<&str>
pub fn slab_locator(&self) -> Option<&str>
Convenience accessor for the single-slab case.
Trait Implementations§
Source§impl Clone for WriteArtifact
impl Clone for WriteArtifact
Source§fn clone(&self) -> WriteArtifact
fn clone(&self) -> WriteArtifact
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for WriteArtifact
impl RefUnwindSafe for WriteArtifact
impl Send for WriteArtifact
impl Sync for WriteArtifact
impl Unpin for WriteArtifact
impl UnsafeUnpin for WriteArtifact
impl UnwindSafe for WriteArtifact
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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