Skip to main content

ReleaseBundle

Trait ReleaseBundle 

Source
pub trait ReleaseBundle: Send + Sync {
    // Required methods
    fn manifest(&self) -> Result<ReleaseManifest, AppError>;
    fn blob(&self, digest: &Sha256) -> Result<Vec<u8>, AppError>;

    // Provided methods
    fn artifact(&self, path: &str) -> Result<Vec<u8>, AppError> { ... }
    fn declaration(&self) -> Result<Declaration, AppError> { ... }
}
Expand description

One release’s bytes, however they were obtained.

Required Methods§

Source

fn manifest(&self) -> Result<ReleaseManifest, AppError>

What this bundle says about itself.

§Errors

AppError when the bundle cannot describe itself.

Source

fn blob(&self, digest: &Sha256) -> Result<Vec<u8>, AppError>

One artifact’s bytes, by digest.

§Errors

AppError::Refused when the bundle carries no such digest.

Provided Methods§

Source

fn artifact(&self, path: &str) -> Result<Vec<u8>, AppError>

One artifact’s bytes, by the path the manifest names.

§Errors

AppError::Refused when the bundle carries no such path.

Source

fn declaration(&self) -> Result<Declaration, AppError>

What this release declares it lands.

§Errors

AppError::Refused when the bundle carries no declaration or the declaration is one this engine does not decode.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§