Skip to main content

Store

Trait Store 

Source
pub trait Store {
    // Required methods
    fn repository(&self, index: usize) -> Option<&str>;
    fn tag(&self, repository: &str, index: usize) -> Option<&str>;
    fn contains_repository(&self, repository: &str) -> bool;
    fn manifest(&self, repository: &str, reference: &str) -> Option<Content<'_>>;
    fn blob(&self, repository: &str, digest: Digest) -> Option<Content<'_>>;
}
Expand description

Storage contract for a read-only registry.

Names must follow OCI repository/tag grammar and be unique. Indexed lists terminate at the first None; their order need not be sorted. Content digests must describe the exact bytes returned. Blob lookup is repository scoped.

Required Methods§

Source

fn repository(&self, index: usize) -> Option<&str>

Source

fn tag(&self, repository: &str, index: usize) -> Option<&str>

Source

fn contains_repository(&self, repository: &str) -> bool

Source

fn manifest(&self, repository: &str, reference: &str) -> Option<Content<'_>>

Source

fn blob(&self, repository: &str, digest: Digest) -> Option<Content<'_>>

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§