pub struct RustRepo {
pub name: String,
pub artifacts: Vec<ArtifactId>,
}Expand description
Minimal RustRepo example
Fields§
§name: String§artifacts: Vec<ArtifactId>Implementations§
Source§impl RustRepo
impl RustRepo
pub fn new(name: String) -> Self
Sourcepub fn sparse_path(crate_name: &str) -> (String, String, String)
pub fn sparse_path(crate_name: &str) -> (String, String, String)
Convert crate name to Cargo sparse 5-part path (p1, p2, name)
Sourcepub fn sparse_crate_from_parts<'a>(parts: &'a [&'a str]) -> Option<&'a str>
pub fn sparse_crate_from_parts<'a>(parts: &'a [&'a str]) -> Option<&'a str>
Reverse matcher: takes a sparse path slice [“xx”,“yy”,“name”] -> crate name
pub fn crate_sha256_hex(data: &[u8]) -> String
Trait Implementations§
Source§impl RepositoryBackendTrait for RustRepo
impl RepositoryBackendTrait for RustRepo
fn name(&self) -> &str
fn handle_http2_request( &self, suburl: &str, body: &[u8], ) -> Result<(u16, Vec<(String, String)>, Vec<u8>)>
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 fetch_many_with_upstreams( &self, upstreams: &[Arc<dyn RepositoryBackendTrait>], ids: &[ArtifactId], ) -> Result<HashMap<ArtifactId, Vec<u8>>, Error>
Auto Trait Implementations§
impl Freeze for RustRepo
impl RefUnwindSafe for RustRepo
impl Send for RustRepo
impl Sync for RustRepo
impl Unpin for RustRepo
impl UnwindSafe for RustRepo
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