pub struct WorkspaceLockfile<P: LockfilePermissions> { /* private fields */ }Expand description
A lockfile for a Lua project
Implementations§
Source§impl WorkspaceLockfile<ReadOnly>
impl WorkspaceLockfile<ReadOnly>
Sourcepub fn new(
filepath: PathBuf,
) -> Result<WorkspaceLockfile<ReadOnly>, LockfileError>
pub fn new( filepath: PathBuf, ) -> Result<WorkspaceLockfile<ReadOnly>, LockfileError>
Create a new ProjectLockfile, writing an empty file if none exists.
Sourcepub fn load(
filepath: PathBuf,
) -> Result<WorkspaceLockfile<ReadOnly>, LockfileError>
pub fn load( filepath: PathBuf, ) -> Result<WorkspaceLockfile<ReadOnly>, LockfileError>
Load a ProjectLockfile, failing if none exists.
Sourcepub fn write_guard(self) -> ProjectLockfileGuard
pub fn write_guard(self) -> ProjectLockfileGuard
Creates a project lockfile guard, flushing the lockfile automatically once the guard goes out of scope.
Trait Implementations§
Source§impl<P: Clone + LockfilePermissions> Clone for WorkspaceLockfile<P>
impl<P: Clone + LockfilePermissions> Clone for WorkspaceLockfile<P>
Source§impl<P: Debug + LockfilePermissions> Debug for WorkspaceLockfile<P>
impl<P: Debug + LockfilePermissions> Debug for WorkspaceLockfile<P>
Source§impl<'de, P: LockfilePermissions> Deserialize<'de> for WorkspaceLockfile<P>
impl<'de, P: LockfilePermissions> Deserialize<'de> for WorkspaceLockfile<P>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<P: LockfilePermissions> Serialize for WorkspaceLockfile<P>
impl<P: LockfilePermissions> Serialize for WorkspaceLockfile<P>
Auto Trait Implementations§
impl<P> Freeze for WorkspaceLockfile<P>where
PhantomData<P>: Freeze,
impl<P> RefUnwindSafe for WorkspaceLockfile<P>where
PhantomData<P>: RefUnwindSafe,
impl<P> Send for WorkspaceLockfile<P>where
PhantomData<P>: Send,
impl<P> Sync for WorkspaceLockfile<P>where
PhantomData<P>: Sync,
impl<P> Unpin for WorkspaceLockfile<P>where
PhantomData<P>: Unpin,
impl<P> UnsafeUnpin for WorkspaceLockfile<P>where
PhantomData<P>: UnsafeUnpin,
impl<P> UnwindSafe for WorkspaceLockfile<P>where
PhantomData<P>: UnwindSafe,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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 moreimpl<T> OrderedSeq<'_, T> for Twhere
T: Clone,
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<'p, T> Seq<'p, T> for Twhere
T: Clone,
impl<'p, T> Seq<'p, T> for Twhere
T: Clone,
Source§impl<T, S> SpanWrap<S> for Twhere
S: WrappingSpan<T>,
impl<T, S> SpanWrap<S> for Twhere
S: WrappingSpan<T>,
Source§fn with_span(self, span: S) -> <S as WrappingSpan<Self>>::Spanned
fn with_span(self, span: S) -> <S as WrappingSpan<Self>>::Spanned
Invokes
WrappingSpan::make_wrapped to wrap an AST node in a span.