pub struct ProjectLockfile<P: LockfilePermissions> { /* private fields */ }Expand description
A lockfile for a Lua project
Implementations§
Source§impl ProjectLockfile<ReadOnly>
impl ProjectLockfile<ReadOnly>
Sourcepub fn new(
filepath: PathBuf,
) -> Result<ProjectLockfile<ReadOnly>, LockfileError>
pub fn new( filepath: PathBuf, ) -> Result<ProjectLockfile<ReadOnly>, LockfileError>
Create a new ProjectLockfile, writing an empty file if none exists.
Sourcepub fn load(
filepath: PathBuf,
) -> Result<ProjectLockfile<ReadOnly>, LockfileError>
pub fn load( filepath: PathBuf, ) -> Result<ProjectLockfile<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 ProjectLockfile<P>
impl<P: Clone + LockfilePermissions> Clone for ProjectLockfile<P>
Source§fn clone(&self) -> ProjectLockfile<P>
fn clone(&self) -> ProjectLockfile<P>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<P: Debug + LockfilePermissions> Debug for ProjectLockfile<P>
impl<P: Debug + LockfilePermissions> Debug for ProjectLockfile<P>
Source§impl<'de, P: LockfilePermissions> Deserialize<'de> for ProjectLockfile<P>
impl<'de, P: LockfilePermissions> Deserialize<'de> for ProjectLockfile<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 ProjectLockfile<P>
impl<P: LockfilePermissions> Serialize for ProjectLockfile<P>
Auto Trait Implementations§
impl<P> Freeze for ProjectLockfile<P>
impl<P> RefUnwindSafe for ProjectLockfile<P>where
P: RefUnwindSafe,
impl<P> Send for ProjectLockfile<P>where
P: Send,
impl<P> Sync for ProjectLockfile<P>where
P: Sync,
impl<P> Unpin for ProjectLockfile<P>where
P: Unpin,
impl<P> UnwindSafe for ProjectLockfile<P>where
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
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 moreSource§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,
Source§impl<'p, T> Seq<'p, T> for Twhere
T: Clone,
impl<'p, T> Seq<'p, T> for Twhere
T: Clone,
Source§impl<T> Serialize for T
impl<T> Serialize for T
fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<(), Error>
fn do_erased_serialize( &self, serializer: &mut dyn Serializer, ) -> Result<(), ErrorImpl>
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.