pub struct LockIndex<'a> { /* private fields */ }Expand description
Ephemeral lookup index for lock files.
LockFile preserves the persisted v2 shape. Build this short-lived index
at hot call sites that need repeated output-path lookups.
Implementations§
Source§impl<'a> LockIndex<'a>
impl<'a> LockIndex<'a>
pub fn new(lock: &'a LockFile) -> Self
Sourcepub fn find_by_dest_path(&self, dest_path: &DestPath) -> Option<LockedItem>
pub fn find_by_dest_path(&self, dest_path: &DestPath) -> Option<LockedItem>
Look up a locked item by output dest_path, returning a flat LockedItem view.
Sourcepub fn contains_dest_path(&self, dest_path: &DestPath) -> bool
pub fn contains_dest_path(&self, dest_path: &DestPath) -> bool
Check if any output record has the given dest_path.
Auto Trait Implementations§
impl<'a> Freeze for LockIndex<'a>
impl<'a> RefUnwindSafe for LockIndex<'a>
impl<'a> Send for LockIndex<'a>
impl<'a> Sync for LockIndex<'a>
impl<'a> Unpin for LockIndex<'a>
impl<'a> UnsafeUnpin for LockIndex<'a>
impl<'a> UnwindSafe for LockIndex<'a>
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> 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