Trait RepositoryBackendTrait
Source pub trait RepositoryBackendTrait: Send + Sync {
// Required methods
fn name(&self) -> &str;
fn format(&self) -> ArtifactFormat;
fn is_writable(&self) -> bool;
fn fetch(&self, id: &ArtifactId) -> Result<Option<Vec<u8>>>;
fn put(&self, id: &ArtifactId, data: &[u8]) -> Result<()>;
fn handle_http2_request(
&self,
suburl: &str,
body: &[u8],
) -> Result<(u16, Vec<(String, String)>, Vec<u8>)>;
// Provided method
fn fetch_many_with_upstreams(
&self,
upstreams: &[Arc<dyn RepositoryBackendTrait>],
ids: &[ArtifactId],
) -> Result<HashMap<ArtifactId, Vec<u8>>> { ... }
}