pub struct CachedRuntimePackages { /* private fields */ }Expand description
Production package adapter. It takes an e2 lease before returning, so a cache entry can never look unused while its runtime is starting.
Implementations§
Source§impl CachedRuntimePackages
impl CachedRuntimePackages
Sourcepub const fn new(cache: Arc<PackageCache>, shared: SharedPackages) -> Self
pub const fn new(cache: Arc<PackageCache>, shared: SharedPackages) -> Self
One target’s view of the package directory the targets of shared use.
Trait Implementations§
Source§impl Debug for CachedRuntimePackages
impl Debug for CachedRuntimePackages
Source§impl RuntimePackages for CachedRuntimePackages
impl RuntimePackages for CachedRuntimePackages
Source§fn prune_obsolete_guarded(
&self,
_authority: PruneAuthority<'_>,
attempts: &[RunnerAttempt],
) -> Result<(), FailureReason>
fn prune_obsolete_guarded( &self, _authority: PruneAuthority<'_>, attempts: &[RunnerAttempt], ) -> Result<(), FailureReason>
Everything but the newest version, when nothing is using the trees: a copy from an older version, or an install in progress, makes this a no-op, and a later launch prunes what it left, which costs only disk.
Source§fn materialize<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
attempt: &'life1 RunnerAttempt,
timings: &'life2 mut PackageTimings,
) -> Pin<Box<dyn Future<Output = Result<RunnerVersion, FailureReason>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn materialize<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
attempt: &'life1 RunnerAttempt,
timings: &'life2 mut PackageTimings,
) -> Pin<Box<dyn Future<Output = Result<RunnerVersion, FailureReason>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Copy the package into
attempt’s runtime, adding where the time went
to timings.fn release(&self, attempt: AttemptId) -> Result<(), FailureReason>
Auto Trait Implementations§
impl !RefUnwindSafe for CachedRuntimePackages
impl !UnwindSafe for CachedRuntimePackages
impl Forget for CachedRuntimePackages
impl Freeze for CachedRuntimePackages
impl Move for CachedRuntimePackages
impl Send for CachedRuntimePackages
impl Sync for CachedRuntimePackages
impl Unpin for CachedRuntimePackages
impl UnsafeUnpin for CachedRuntimePackages
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