pub struct LockfileIO;Implementations§
Source§impl LockfileIO
impl LockfileIO
Sourcepub fn scan_and_write(
project_root: &str,
generator_root: &str,
) -> Result<Lockfile>
pub fn scan_and_write( project_root: &str, generator_root: &str, ) -> Result<Lockfile>
Scan + write the lockfile (creating the generator dir if needed).
generator_root controls where csproj.lock and lock-fingerprint live;
pass [DEFAULT_GENERATOR_ROOT] for the standard layout.
Short-circuits when the recorded fingerprint (see [lock_cache]) shows nothing
has changed since the last lock. In the cache-hit path no Unity-install scan
or project-side walk runs; we just refresh the fingerprint timestamps and return
the existing lockfile.
Sourcepub fn load_or_scan(
project_root: &str,
generator_root: &str,
) -> Result<Lockfile>
pub fn load_or_scan( project_root: &str, generator_root: &str, ) -> Result<Lockfile>
Read the lockfile if present, else scan + write a fresh one.
See scan_and_write for the generator_root argument.
pub fn write(lockfile: &Lockfile, path: &str) -> Result<()>
pub fn read(path: &str) -> Result<Lockfile>
Auto Trait Implementations§
impl Freeze for LockfileIO
impl RefUnwindSafe for LockfileIO
impl Send for LockfileIO
impl Sync for LockfileIO
impl Unpin for LockfileIO
impl UnsafeUnpin for LockfileIO
impl UnwindSafe for LockfileIO
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> 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