pub struct FileVersionStore { /* private fields */ }Expand description
Session-local file version store used for read-before-write checks.
Implementations§
Source§impl FileVersionStore
impl FileVersionStore
Sourcepub fn record(&self, evidence: FileVersionEvidence)
pub fn record(&self, evidence: FileVersionEvidence)
Record a file version under its normalized path key.
Sourcepub fn get(&self, path: impl AsRef<Path>) -> Option<FileVersionEvidence>
pub fn get(&self, path: impl AsRef<Path>) -> Option<FileVersionEvidence>
Return the version evidence stored for a path.
Sourcepub fn matches(&self, evidence: &FileVersionEvidence) -> bool
pub fn matches(&self, evidence: &FileVersionEvidence) -> bool
Return true when the stored version matches the supplied evidence.
Trait Implementations§
Source§impl Clone for FileVersionStore
impl Clone for FileVersionStore
Source§fn clone(&self) -> FileVersionStore
fn clone(&self) -> FileVersionStore
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 moreSource§impl Default for FileVersionStore
impl Default for FileVersionStore
Source§fn default() -> FileVersionStore
fn default() -> FileVersionStore
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for FileVersionStore
impl !UnwindSafe for FileVersionStore
impl Freeze for FileVersionStore
impl Send for FileVersionStore
impl Sync for FileVersionStore
impl Unpin for FileVersionStore
impl UnsafeUnpin for FileVersionStore
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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