pub struct WickPackage { /* private fields */ }
Expand description
Represents a Wick package, including its files and metadata.
Implementations§
Source§impl WickPackage
impl WickPackage
Sourcepub async fn from_path(
basedir: Option<PathBuf>,
path: &Path,
) -> Result<Self, Error>
pub async fn from_path( basedir: Option<PathBuf>, path: &Path, ) -> Result<Self, Error>
Creates a new WickPackage from the provided path.
The provided path can be a file or directory. If it is a directory, the WickPackage will be created based on the files within the directory.
Sourcepub fn list_files(&self) -> Vec<&PackageFile>
pub fn list_files(&self) -> Vec<&PackageFile>
Returns a list of the files contained within the WickPackage.
Sourcepub const fn basedir(&self) -> Option<&PathBuf>
pub const fn basedir(&self) -> Option<&PathBuf>
Return the base directory of the WickPackage if it came from the filesystem.
Sourcepub const fn path(&self) -> &PathBuf
pub const fn path(&self) -> &PathBuf
Returns a list of the files contained within the WickPackage.
Sourcepub fn registry_reference(&self) -> Option<String>
pub fn registry_reference(&self) -> Option<String>
Returns the reference.
Sourcepub fn tagged_reference(&self, tag: &str) -> Option<String>
pub fn tagged_reference(&self, tag: &str) -> Option<String>
Returns an OCI URL with the specified tag.
Sourcepub const fn registry(&self) -> Option<&RegistryConfig>
pub const fn registry(&self) -> Option<&RegistryConfig>
Returns the registry configuration.
Sourcepub fn registry_mut(&mut self) -> Option<&mut RegistryConfig>
pub fn registry_mut(&mut self) -> Option<&mut RegistryConfig>
Returns a mutable reference to registry configuration.
Sourcepub async fn push(
&mut self,
reference: &str,
options: &OciOptions,
) -> Result<String, Error>
pub async fn push( &mut self, reference: &str, options: &OciOptions, ) -> Result<String, Error>
Pushes the WickPackage to a specified registry using the provided reference, username, and password.
The username and password are optional. If not provided, the function falls back to anonymous authentication.
Trait Implementations§
Source§impl Clone for WickPackage
impl Clone for WickPackage
Source§fn clone(&self) -> WickPackage
fn clone(&self) -> WickPackage
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl Freeze for WickPackage
impl RefUnwindSafe for WickPackage
impl Send for WickPackage
impl Sync for WickPackage
impl Unpin for WickPackage
impl UnwindSafe for WickPackage
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§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>
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>
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 more