Struct cargo_fetcher::Ctx
source · pub struct Ctx {
pub client: HttpClient,
pub backend: Storage,
pub krates: Vec<Krate>,
pub registries: Vec<Arc<Registry>>,
pub root_dir: PathBuf,
}Fields§
§client: HttpClient§backend: Storage§krates: Vec<Krate>§registries: Vec<Arc<Registry>>§root_dir: PathBufImplementations§
source§impl Ctx
impl Ctx
pub fn new( root_dir: Option<PathBuf>, backend: Storage, krates: Vec<Krate>, registries: Vec<Arc<Registry>> ) -> Result<Self, Error>
sourcepub fn prep_sync_dirs(&self) -> Result<(), Error>
pub fn prep_sync_dirs(&self) -> Result<(), Error>
Create the registry and git directories as they are the root of multiple other ones
pub fn registry_sets(&self) -> Vec<RegistrySet>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Ctx
impl Send for Ctx
impl Sync for Ctx
impl Unpin for Ctx
impl !UnwindSafe for Ctx
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