Struct wasmcloud_core::oci::OciFetcher
source · pub struct OciFetcher { /* private fields */ }
Expand description
OCI artifact fetcher
Implementations§
source§impl OciFetcher
impl OciFetcher
sourcepub async fn fetch_path(
&self,
output_dir: impl AsRef<Path>,
img: impl AsRef<str>,
accepted_media_types: Vec<&str>,
cache: OciArtifactCacheUpdate,
) -> Result<(PathBuf, CacheResult)>
pub async fn fetch_path( &self, output_dir: impl AsRef<Path>, img: impl AsRef<str>, accepted_media_types: Vec<&str>, cache: OciArtifactCacheUpdate, ) -> Result<(PathBuf, CacheResult)>
Fetch an OCI artifact to a path and return that path. Returns the path and whether or not there was a cache hit/miss
sourcepub async fn fetch_component(&self, oci_ref: impl AsRef<str>) -> Result<Vec<u8>>
pub async fn fetch_component(&self, oci_ref: impl AsRef<str>) -> Result<Vec<u8>>
Fetch component from OCI
§Errors
Returns an error if either fetching fails or reading the fetched OCI path fails
sourcepub async fn fetch_provider(
&self,
oci_ref: impl AsRef<str>,
host_id: impl AsRef<str>,
) -> Result<(PathBuf, Option<Token<CapabilityProvider>>)>
pub async fn fetch_provider( &self, oci_ref: impl AsRef<str>, host_id: impl AsRef<str>, ) -> Result<(PathBuf, Option<Token<CapabilityProvider>>)>
Fetch provider from OCI
§Errors
Returns an error if either fetching fails or reading the fetched OCI path fails
sourcepub fn with_additional_ca_paths(self, paths: &[impl AsRef<Path>]) -> Self
pub fn with_additional_ca_paths(self, paths: &[impl AsRef<Path>]) -> Self
Used to set additional CA paths that will be used as part of fetching components and providers
Trait Implementations§
source§impl Clone for OciFetcher
impl Clone for OciFetcher
source§fn clone(&self) -> OciFetcher
fn clone(&self) -> OciFetcher
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for OciFetcher
impl Debug for OciFetcher
source§impl Default for OciFetcher
impl Default for OciFetcher
source§impl From<&RegistryConfig> for OciFetcher
impl From<&RegistryConfig> for OciFetcher
source§fn from(_: &RegistryConfig) -> Self
fn from(_: &RegistryConfig) -> Self
Converts to this type from the input type.
source§impl From<RegistryConfig> for OciFetcher
impl From<RegistryConfig> for OciFetcher
source§fn from(_: RegistryConfig) -> Self
fn from(_: RegistryConfig) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for OciFetcher
impl RefUnwindSafe for OciFetcher
impl Send for OciFetcher
impl Sync for OciFetcher
impl Unpin for OciFetcher
impl UnwindSafe for OciFetcher
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)