[][src]Struct cargo_whatfeatures::Client

pub struct Client { /* fields omitted */ }

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]

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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.