Struct warg_loader::Client
source · pub struct Client { /* private fields */ }Expand description
A read-only registry client.
Implementations§
source§impl Client
impl Client
sourcepub fn new(config: ClientConfig) -> Self
pub fn new(config: ClientConfig) -> Self
Returns a new client with the given ClientConfig.
sourcepub fn from_default_config_file() -> Result<Option<Self>, Error>
pub fn from_default_config_file() -> Result<Option<Self>, Error>
Returns a new client configured from the default config file path. Returns Ok(None) if the default config file does not exist.
sourcepub async fn list_all_versions(
&mut self,
package: &PackageRef
) -> Result<Vec<Version>, Error>
pub async fn list_all_versions( &mut self, package: &PackageRef ) -> Result<Vec<Version>, Error>
Returns a list of all package Versions available for the given package.
sourcepub async fn get_release(
&mut self,
package: &PackageRef,
version: &Version
) -> Result<Release, Error>
pub async fn get_release( &mut self, package: &PackageRef, version: &Version ) -> Result<Release, Error>
Returns a Release for the given package version.
Auto Trait Implementations§
impl Freeze for Client
impl !RefUnwindSafe for Client
impl !Send for Client
impl !Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
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