Struct wasmcloud_host::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), Error>
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), Error>
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>, Error>
pub async fn fetch_component( &self, oci_ref: impl AsRef<str>, ) -> Result<Vec<u8>, Error>
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>>), Error>
pub async fn fetch_provider( &self, oci_ref: impl AsRef<str>, host_id: impl AsRef<str>, ) -> Result<(PathBuf, Option<Token<CapabilityProvider>>), Error>
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>]) -> OciFetcher
pub fn with_additional_ca_paths(self, paths: &[impl AsRef<Path>]) -> OciFetcher
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§fn default() -> OciFetcher
fn default() -> OciFetcher
Returns the “default value” for a type. Read more
source§impl From<&RegistryConfig> for OciFetcher
impl From<&RegistryConfig> for OciFetcher
source§fn from(_: &RegistryConfig) -> OciFetcher
fn from(_: &RegistryConfig) -> OciFetcher
Converts to this type from the input type.
source§impl From<RegistryConfig> for OciFetcher
impl From<RegistryConfig> for OciFetcher
source§fn from(_: RegistryConfig) -> OciFetcher
fn from(_: RegistryConfig) -> OciFetcher
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
)source§impl<T> FutureExt for T
impl<T> FutureExt for T
source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
source§impl<T> GetSetFdFlags for T
impl<T> GetSetFdFlags for T
source§fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
Query the “status” flags for the
self
file descriptor.source§fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
source§fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
Set the “status” flags for the
self
file descriptor. Read moresource§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request