pub enum PackageSource {
InMemory(InMemoryRegistrySource),
Registry(Registry),
TestRegistry(TestRegistry),
}
Variants§
Trait Implementations§
Source§impl Clone for PackageSource
impl Clone for PackageSource
Source§fn clone(&self) -> PackageSource
fn clone(&self) -> PackageSource
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl PackageSourceProvider for PackageSource
impl PackageSourceProvider for PackageSource
Source§fn update(&self) -> Result<()>
fn update(&self) -> Result<()>
Update this package source, if it has state that needs to be updated.
Source§fn query(&self, package_req: &PackageReq) -> Result<Vec<Manifest>>
fn query(&self, package_req: &PackageReq) -> Result<Vec<Manifest>>
Query this package source for all of the packages that match this
PackageReq
.Source§fn download_package(&self, package_id: &PackageId) -> Result<PackageContents>
fn download_package(&self, package_id: &PackageId) -> Result<PackageContents>
Downloads the contents of a package given its fully-qualified
PackageId
.Source§fn fallback_sources(&self) -> Result<Vec<PackageSourceId>>
fn fallback_sources(&self) -> Result<Vec<PackageSourceId>>
Provide a list of fallback sources to search if this source can’t provide a package
Auto Trait Implementations§
impl !Freeze for PackageSource
impl !RefUnwindSafe for PackageSource
impl Send for PackageSource
impl Sync for PackageSource
impl Unpin for PackageSource
impl !UnwindSafe for PackageSource
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