1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
//! Forge-agnostic decorators over [`crate::domain::resolution::VersionRegistry`].
//!
//! These wrap any registry rather than any particular forge: they key off the
//! forge-neutral [`crate::domain::resolution::Error`] classification, so a second
//! backend gets the same behavior for free.
//!
//! Composed cache-outside-retry — `Caching::new(Retrying::new(registry))` — so a
//! cache hit short-circuits before any retry runs, and a wait is only ever spent
//! on a request that genuinely has to reach the forge.
/// Per-run memoizing decorator over any [`crate::domain::resolution::VersionRegistry`].
/// Bounded retry with backoff for rate-limited resolution requests.
pub use Caching;
pub use ;
use crateVersionRegistry;
use RefCell;
use Rc;
/// A progress callback shared between a command and its registry.
///
/// Commands own their `&mut dyn FnMut(&str)` and hand it to a planner, so a
/// registry cannot also hold it. Moving it behind `Rc<RefCell<_>>` lets both
/// reach it: the planner borrows it per call, and the retry layer borrows it to
/// announce a wait *before* sleeping, so the spinner explains the pause while
/// the pause is happening rather than after it.
pub type SharedProgress<'cb> = ;
/// Build the decorator stack every command wraps its forge registry in.
///
/// Cache outside retry: a repeated query is answered from the cache and never
/// reaches the retry layer, so a wait is only ever spent on a request that
/// genuinely has to reach the forge. Inverting this would let a cached answer
/// sit behind a sleep that had already been paid for an earlier identical call.
///
/// The returned registry and the returned progress closure share `on_progress`.
/// Pass the closure to the planner in place of the original callback.