pub(crate) struct Stage {
entries: Vec<ManifestEntry>,
directory: PathBuf,
}Expand description
The artifacts a publication run was given, read once for every unit.
Fields§
§entries: Vec<ManifestEntry>§directory: PathBufImplementations§
Source§impl Stage
impl Stage
Sourcepub(crate) fn read(
manifest: &Path,
directory: &Path,
) -> Result<Self, ArtifactError>
pub(crate) fn read( manifest: &Path, directory: &Path, ) -> Result<Self, ArtifactError>
Read the manifest of the built artifacts in directory.
§Errors
Returns an error when the manifest cannot be read or decoded.
Sourcepub(crate) fn package(
&self,
unit: &str,
kind: PackageKind,
name: &str,
package: &str,
) -> Result<PathBuf, ArtifactError>
pub(crate) fn package( &self, unit: &str, kind: PackageKind, name: &str, package: &str, ) -> Result<PathBuf, ArtifactError>
The staged package file of one unit.
name and package are the artifact name and package the evaluated
state declares.
§Errors
Returns an error when the unit does not stage exactly one package of
kind, when it disagrees with the declaration, or when the file is
missing.
Sourcepub(crate) fn asset_bytes(
&self,
unit: &str,
name: &str,
) -> Result<Option<Vec<u8>>, ArtifactError>
pub(crate) fn asset_bytes( &self, unit: &str, name: &str, ) -> Result<Option<Vec<u8>>, ArtifactError>
The bytes of the staged asset name of unit, or None when the
manifest has no such asset.
§Errors
Returns an error when the asset file cannot be read.
Sourcepub(crate) fn release<'a>(
&self,
publication: Publication<'a>,
login: Option<&OciLogin>,
) -> Result<StagedRelease<'a>, ArtifactError>
pub(crate) fn release<'a>( &self, publication: Publication<'a>, login: Option<&OciLogin>, ) -> Result<StagedRelease<'a>, ArtifactError>
Check and read the staged files of one publication.
§Errors
Returns an error when the staged files do not match the publication,
or an OCI artifact has no login.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Stage
impl RefUnwindSafe for Stage
impl Send for Stage
impl Sync for Stage
impl Unpin for Stage
impl UnsafeUnpin for Stage
impl UnwindSafe for Stage
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