pub struct Overlay { /* private fields */ }Expand description
An in-memory overlay that captures writes on top of the immutable DAG. Reads check the overlay first; if not found, fall through to the DAG/CAS.
Implementations§
Source§impl Overlay
impl Overlay
pub fn new() -> Self
Sourcepub fn read(&self, path: &str) -> Option<&[u8]>
pub fn read(&self, path: &str) -> Option<&[u8]>
Read data from the overlay. Returns None if path is not in the overlay.
Sourcepub fn is_deleted(&self, path: &str) -> bool
pub fn is_deleted(&self, path: &str) -> bool
Check if a path is explicitly deleted.
Sourcepub fn modified_paths(&self) -> Vec<&str>
pub fn modified_paths(&self) -> Vec<&str>
Return all modified paths (written + deleted).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Overlay
impl RefUnwindSafe for Overlay
impl Send for Overlay
impl Sync for Overlay
impl Unpin for Overlay
impl UnsafeUnpin for Overlay
impl UnwindSafe for Overlay
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