pub struct PackResolver { /* private fields */ }Expand description
Pack resolver.
Implementations§
Source§impl PackResolver
impl PackResolver
Sourcepub fn new() -> RegistryResult<Self>
pub fn new() -> RegistryResult<Self>
Create a new resolver with default configuration.
Sourcepub fn with_config(config: ResolverConfig) -> RegistryResult<Self>
pub fn with_config(config: ResolverConfig) -> RegistryResult<Self>
Create a resolver with custom configuration.
Sourcepub fn with_components(
client: RegistryClient,
cache: PackCache,
trust_store: TrustStore,
config: ResolverConfig,
) -> Self
pub fn with_components( client: RegistryClient, cache: PackCache, trust_store: TrustStore, config: ResolverConfig, ) -> Self
Create a resolver for testing with custom components.
Sourcepub async fn resolve(&self, reference: &str) -> RegistryResult<ResolvedPack>
pub async fn resolve(&self, reference: &str) -> RegistryResult<ResolvedPack>
Resolve a pack reference to content.
Sourcepub async fn resolve_ref(
&self,
pack_ref: &PackRef,
) -> RegistryResult<ResolvedPack>
pub async fn resolve_ref( &self, pack_ref: &PackRef, ) -> RegistryResult<ResolvedPack>
Resolve a parsed pack reference.
Sourcepub async fn prefetch(&self, reference: &str) -> RegistryResult<()>
pub async fn prefetch(&self, reference: &str) -> RegistryResult<()>
Pre-fetch a pack for offline use.
Sourcepub fn trust_store(&self) -> &TrustStore
pub fn trust_store(&self) -> &TrustStore
Get the trust store.
Auto Trait Implementations§
impl Freeze for PackResolver
impl !RefUnwindSafe for PackResolver
impl Send for PackResolver
impl Sync for PackResolver
impl Unpin for PackResolver
impl UnsafeUnpin for PackResolver
impl !UnwindSafe for PackResolver
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