[][src]Trait librepology::v1::api::Api

pub trait Api {
    fn project<N: AsRef<str>>(&self, name: N) -> Result<Vec<Package>>;
fn problems_for_repo<R: AsRef<str>>(&self, repo: R) -> Result<Vec<Problem>>;
fn problems_for_maintainer<M: AsRef<str>>(
        &self,
        maintainer: M
    ) -> Result<Vec<Problem>>; }

The high-level functionality of the repology API is represented in this trait

Each "functionality" is represented via one function.

Note

This is implemented as a trait rather than a struct because this way we can reuse the functionality for operating on a stream, for example on stdin as a source of data.

Required methods

fn project<N: AsRef<str>>(&self, name: N) -> Result<Vec<Package>>

fn problems_for_repo<R: AsRef<str>>(&self, repo: R) -> Result<Vec<Problem>>

fn problems_for_maintainer<M: AsRef<str>>(
    &self,
    maintainer: M
) -> Result<Vec<Problem>>

Loading content...

Implementors

impl Api for RestApi[src]

impl Api for StdinWrapper[src]

Loading content...