pub struct LocalProgressStore { /* private fields */ }Expand description
Stores local progress for one project and language.
Implementations§
Source§impl LocalProgressStore
impl LocalProgressStore
pub fn new(project_root: &Path, language: Language) -> Self
Sourcepub fn load(&self) -> Result<LocalProgress, LocalProgressStoreError>
pub fn load(&self) -> Result<LocalProgress, LocalProgressStoreError>
Loads the last saved snapshot, or empty progress if none exists.
§Errors
Returns an error if the snapshot cannot be read or decoded.
Sourcepub fn record(
&self,
report: &ProgressReport,
) -> Result<(), LocalProgressStoreError>
pub fn record( &self, report: &ProgressReport, ) -> Result<(), LocalProgressStoreError>
Merges the reported part outcomes and atomically replaces the snapshot.
§Errors
Returns an error if the snapshot cannot be loaded, locked, or written.
Auto Trait Implementations§
impl Forget for LocalProgressStore
impl Freeze for LocalProgressStore
impl Move for LocalProgressStore
impl RefUnwindSafe for LocalProgressStore
impl Send for LocalProgressStore
impl Sync for LocalProgressStorewhere
RawVecInner: Sync,
impl Unpin for LocalProgressStore
impl UnsafeUnpin for LocalProgressStore
impl UnwindSafe for LocalProgressStore
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