pub struct CrateReleaseSource { /* private fields */ }Expand description
The crates venue for one selector.
Implementations§
Source§impl CrateReleaseSource
impl CrateReleaseSource
Sourcepub fn new(selector: &str) -> Result<Self, RkError>
pub fn new(selector: &str) -> Result<Self, RkError>
A source for selector — latest or an exact version — caching
under the state root.
§Errors
Returns RkError::Refusal when no state root can be located.
Sourcepub fn with_cache(selector: &str, cache: impl Into<PathBuf>) -> Self
pub fn with_cache(selector: &str, cache: impl Into<PathBuf>) -> Self
A source caching under an explicit directory.
Sourcepub fn resolve(&self) -> Result<&Resolved, RkError>
pub fn resolve(&self) -> Result<&Resolved, RkError>
Resolve the selector, fetch and verify the archive where the cache does not hold it, and answer with what happened. Idempotent: the second call answers from the first.
§Errors
Returns a registry-unreachable refusal when the index or the
archive cannot be fetched, a bundle-unverified refusal when the
archive’s digest differs from the index checksum, and a usage
error for a version the index does not list.
Trait Implementations§
Source§impl Debug for CrateReleaseSource
impl Debug for CrateReleaseSource
Auto Trait Implementations§
impl !Freeze for CrateReleaseSource
impl RefUnwindSafe for CrateReleaseSource
impl Send for CrateReleaseSource
impl Sync for CrateReleaseSource
impl Unpin for CrateReleaseSource
impl UnsafeUnpin for CrateReleaseSource
impl UnwindSafe for CrateReleaseSource
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