pub enum RegularFile<ObjectID: FsVerityHashValue> {
Inline(Box<[u8]>),
External(ObjectID, u64),
ExternalNoVerity(ObjectID, u64),
Sparse(u64),
}Expand description
Represents a regular file’s content storage strategy in composefs.
Files can be stored inline for small content or externally referenced for larger files using fsverity hashing.
Variants§
Inline(Box<[u8]>)
File content stored inline as raw bytes.
External(ObjectID, u64)
File stored externally, referenced by fsverity hash and size.
The tuple contains (fsverity hash, file size in bytes). The fsverity digest is embedded in the overlay metacopy xattr.
ExternalNoVerity(ObjectID, u64)
Like External, but without embedding the fsverity digest in the
overlay metacopy xattr. Used by the C API when the caller set a
content-address payload but did not explicitly set a verified digest.
Sparse(u64)
File with declared size but no content or external reference. Produces ChunkBased layout with null chunk indices.
Implementations§
Source§impl<ObjectID: FsVerityHashValue> RegularFile<ObjectID>
impl<ObjectID: FsVerityHashValue> RegularFile<ObjectID>
Trait Implementations§
Source§impl<ObjectID: Clone + FsVerityHashValue> Clone for RegularFile<ObjectID>
impl<ObjectID: Clone + FsVerityHashValue> Clone for RegularFile<ObjectID>
Source§fn clone(&self) -> RegularFile<ObjectID>
fn clone(&self) -> RegularFile<ObjectID>
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<ObjectID> Freeze for RegularFile<ObjectID>where
ObjectID: Freeze,
impl<ObjectID> RefUnwindSafe for RegularFile<ObjectID>where
ObjectID: RefUnwindSafe,
impl<ObjectID> Send for RegularFile<ObjectID>
impl<ObjectID> Sync for RegularFile<ObjectID>
impl<ObjectID> Unpin for RegularFile<ObjectID>
impl<ObjectID> UnsafeUnpin for RegularFile<ObjectID>where
ObjectID: UnsafeUnpin,
impl<ObjectID> UnwindSafe for RegularFile<ObjectID>where
ObjectID: UnwindSafe,
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