pub struct NodeState { /* private fields */ }Expand description
Canonical state of a virtual filesystem node.
Implementations§
Source§impl NodeState
impl NodeState
Sourcepub const fn file(blob: BlobId, size: u64, mode: u32) -> Self
pub const fn file(blob: BlobId, size: u64, mode: u32) -> Self
Construct a regular file backed by an immutable blob.
Sourcepub const fn symlink(blob: BlobId, size: u64, mode: u32) -> Self
pub const fn symlink(blob: BlobId, size: u64, mode: u32) -> Self
Construct an opaque symbolic link backed by its target bytes.
Sourcepub const fn from_stamp(stamp: FileStamp) -> Self
pub const fn from_stamp(stamp: FileStamp) -> Self
Construct a lazily materialized state from verified host metadata.
Sourcepub const fn content(self) -> Option<ContentVersion>
pub const fn content(self) -> Option<ContentVersion>
Return the exact or lazy content version, if applicable.
Sourcepub const fn with_blob(self, blob: BlobId, size: u64) -> Option<Self>
pub const fn with_blob(self, blob: BlobId, size: u64) -> Option<Self>
Return a copy whose file/link content is now materialized.
Sourcepub fn encode_canonical(self, output: &mut Vec<u8>)
pub fn encode_canonical(self, output: &mut Vec<u8>)
Append this state to a stable length-delimited canonical encoding.
Sourcepub fn content_equivalent(self, other: Self) -> bool
pub fn content_equivalent(self, other: Self) -> bool
Return whether only metadata differs between two states.
Trait Implementations§
impl Copy for NodeState
impl Eq for NodeState
Source§impl Ord for NodeState
impl Ord for NodeState
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for NodeState
impl PartialOrd for NodeState
impl StructuralPartialEq for NodeState
Auto Trait Implementations§
impl Freeze for NodeState
impl RefUnwindSafe for NodeState
impl Send for NodeState
impl Sync for NodeState
impl Unpin for NodeState
impl UnsafeUnpin for NodeState
impl UnwindSafe for NodeState
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