pub struct Cache {
pub root: PathBuf,
/* private fields */
}Expand description
The cache for one run; its workspace snapshot is taken on first use.
Fields§
§root: PathBufImplementations§
Source§impl Cache
impl Cache
pub fn new(root: PathBuf) -> Self
Sourcepub fn for_observation(workspace: &Workspace) -> Self
pub fn for_observation(workspace: &Workspace) -> Self
Records verified executions without configuring or using result stores.
Sourcepub fn for_workspace(
workspace: &Workspace,
environment: &BTreeMap<OsString, OsString>,
) -> Self
pub fn for_workspace( workspace: &Workspace, environment: &BTreeMap<OsString, OsString>, ) -> Self
The workspace’s cache, with the remote store its nx.json s3 key
configures, if any. Credentials and modes are read from environment,
which includes the workspace’s dotenv files. A remote store that cannot
be used is reported and left out; the local cache still works.
Sourcepub fn finish(&self, workspace: &Workspace)
pub fn finish(&self, workspace: &Workspace)
Saves what later runs reuse and waits for background saves, uploads and retired-output cleanup, reporting failures.
pub fn run( &self, workspace: &Workspace, graph: &TaskGraph, task: &Task, prepared: &PreparedTask, dependencies: &BTreeMap<String, Fingerprint>, cancelled: &AtomicBool, ) -> Result<TaskResult>
Auto Trait Implementations§
impl !Freeze for Cache
impl !RefUnwindSafe for Cache
impl !UnwindSafe for Cache
impl Send for Cache
impl Sync for Cache
impl Unpin for Cache
impl UnsafeUnpin for Cache
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