[−][src]Struct cargo_whatfeatures::Client
An HTTP client for interacting with crates.io
Implementations
impl Client
[src]
pub fn new(host: impl ToString) -> Self
[src]
Create a new HTTP client with the provided host (e.g. https://crates.io
or http://localhost
)
pub fn cache_latest(&self, crate_name: &str) -> Result<Crate>
[src]
Lookup and cache the latest version for this crate
pub fn cache_crate(
&self,
crate_name: &str,
crate_version: &str
) -> Result<Crate>
[src]
&self,
crate_name: &str,
crate_version: &str
) -> Result<Crate>
Lookup and cache the specified version for this crate
pub fn get_latest(&self, crate_name: &str) -> Result<Version>
[src]
Get the latest version for this crate
pub fn list_versions(&self, crate_name: &str) -> Result<Vec<Version>>
[src]
Get all versions for this crate
Auto Trait Implementations
impl RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl UnwindSafe for Client
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,