mirror of
https://seed.radicle.dev/rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5.git
synced 2026-11-29 22:10:31 +08:00
node: Implement auto-fetching of projects
Signed-off-by: Alexis Sellier <self@cloudhead.io>
This commit is contained in:
@@ -116,6 +116,7 @@ impl Remote<Unverified> {
|
||||
}
|
||||
|
||||
pub trait ReadStorage {
|
||||
fn url(&self) -> Url;
|
||||
fn get(&self, proj: &ProjId) -> Result<Option<Remotes<Unverified>>, Error>;
|
||||
fn inventory(&self) -> Result<Inventory, Error>;
|
||||
}
|
||||
@@ -140,6 +141,10 @@ where
|
||||
T: Deref<Target = S>,
|
||||
S: ReadStorage,
|
||||
{
|
||||
fn url(&self) -> Url {
|
||||
self.deref().url()
|
||||
}
|
||||
|
||||
fn inventory(&self) -> Result<Inventory, Error> {
|
||||
self.deref().inventory()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user