Struct crates_io_api::AsyncClient [−][src]
pub struct AsyncClient { /* fields omitted */ }
Asynchronous client for the crates.io API.
Methods
impl Client
[src]
impl Client
pub fn new(handle: &Handle) -> Self
[src]
pub fn new(handle: &Handle) -> Self
Instantiate a new client.
This will fail if the underlying http client could not be created.
pub fn summary(
&self
) -> impl Future<Item = Summary, Error = Error>
[src]
pub fn summary(
&self
) -> impl Future<Item = Summary, Error = Error>
Retrieve a summary containing crates.io wide information.
pub fn get_crate(
&self,
name: &str
) -> impl Future<Item = CrateResponse, Error = Error>
[src]
pub fn get_crate(
&self,
name: &str
) -> impl Future<Item = CrateResponse, Error = Error>
Retrieve information of a crate.
If you require detailed information, consider using full_crate.
pub fn crate_downloads(
&self,
name: &str
) -> impl Future<Item = Downloads, Error = Error>
[src]
pub fn crate_downloads(
&self,
name: &str
) -> impl Future<Item = Downloads, Error = Error>
Retrieve download stats for a crate.
pub fn crate_owners(
&self,
name: &str
) -> impl Future<Item = Vec<User>, Error = Error>
[src]
pub fn crate_owners(
&self,
name: &str
) -> impl Future<Item = Vec<User>, Error = Error>
Retrieve the owners of a crate.
pub fn crate_reverse_dependencies(
&self,
name: &str
) -> impl Future<Item = Vec<Dependency>, Error = Error>
[src]
pub fn crate_reverse_dependencies(
&self,
name: &str
) -> impl Future<Item = Vec<Dependency>, Error = Error>
Load all reverse dependencies of a crate.
Note: Since the reverse dependency endpoint requires pagination, this will result in multiple requests if the crate has more than 100 reverse dependencies.
Retrieve the authors for a crate version.
pub fn crate_dependencies(
&self,
name: &str,
version: &str
) -> impl Future<Item = Vec<Dependency>, Error = Error>
[src]
pub fn crate_dependencies(
&self,
name: &str,
version: &str
) -> impl Future<Item = Vec<Dependency>, Error = Error>
Retrieve the dependencies of a crate version.
pub fn full_crate(
&self,
name: &str,
all_versions: bool
) -> impl Future<Item = FullCrate, Error = Error>
[src]
pub fn full_crate(
&self,
name: &str,
all_versions: bool
) -> impl Future<Item = FullCrate, Error = Error>
Retrieve all available information for a crate, including download stats, owners and reverse dependencies.
The all_versions
argument controls the retrieval of detailed version
information.
If false, only the data for the latest version will be fetched, if true,
detailed information for all versions will be available.
Note: Each version requires two extra requests.
pub fn crates(
&self,
spec: ListOptions
) -> impl Future<Item = CratesResponse, Error = Error>
[src]
pub fn crates(
&self,
spec: ListOptions
) -> impl Future<Item = CratesResponse, Error = Error>
Retrieve a page of crates, optionally constrained by a query.
If you want to get all results without worrying about paging, use all_crates.
pub fn all_crates(
&self,
query: Option<String>
) -> impl Stream<Item = Crate, Error = Error>
[src]
pub fn all_crates(
&self,
query: Option<String>
) -> impl Stream<Item = Crate, Error = Error>
Retrieve all crates, optionally constrained by a query.
Note: This method fetches all pages of the result. This can result in a lot queries (100 results per query).
pub fn all_crates_full(
&self,
query: Option<String>,
all_versions: bool
) -> impl Stream<Item = FullCrate, Error = Error>
[src]
pub fn all_crates_full(
&self,
query: Option<String>,
all_versions: bool
) -> impl Stream<Item = FullCrate, Error = Error>
Retrieve all crates with all available extra information.
Note: This method fetches not only all crates, but does multiple requests for each crate to retrieve extra information.
This can result in A LOT of queries.
Trait Implementations
Auto Trait Implementations
impl !Send for AsyncClient
impl !Send for AsyncClient
impl !Sync for AsyncClient
impl !Sync for AsyncClient