pub struct LocalFsBackend { /* private fields */ }Expand description
A disk-backed FsBackend implementation.
Holds the session’s workspace root; all reads and writes are first validated by
resolve_workspace_path.
Implementations§
Trait Implementations§
Source§impl FsBackend for LocalFsBackend
impl FsBackend for LocalFsBackend
Source§fn fingerprint(
&self,
path: PathBuf,
) -> BoxFuture<'_, Result<Fingerprint, FsError>>
fn fingerprint( &self, path: PathBuf, ) -> BoxFuture<'_, Result<Fingerprint, FsError>>
Use mtime + size as the fingerprint — much cheaper than the default “read entire file + hash” approach, and sufficient for conflict detection semantics: a change in mtime or size is treated as a conflict.
Source§fn read_text(
&self,
path: PathBuf,
line: Option<u32>,
limit: Option<u32>,
) -> BoxFuture<'_, Result<String, FsError>>
fn read_text( &self, path: PathBuf, line: Option<u32>, limit: Option<u32>, ) -> BoxFuture<'_, Result<String, FsError>>
Reads the entire file as UTF-8 text. Read more
Auto Trait Implementations§
impl Freeze for LocalFsBackend
impl RefUnwindSafe for LocalFsBackend
impl Send for LocalFsBackend
impl Sync for LocalFsBackend
impl Unpin for LocalFsBackend
impl UnsafeUnpin for LocalFsBackend
impl UnwindSafe for LocalFsBackend
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