From 9f8682bee94ee349aa5086bdab257f7ce5cfcdb1 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Thu, 25 Apr 2019 09:32:37 +0200 Subject: Add doc: v1::api::Api --- librepology/src/v1/api.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/librepology/src/v1/api.rs b/librepology/src/v1/api.rs index d740d44..796b10e 100644 --- a/librepology/src/v1/api.rs +++ b/librepology/src/v1/api.rs @@ -9,6 +9,14 @@ use failure::Error; use crate::v1::types::Problem; use crate::v1::types::Package; +/// 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. pub trait Api { fn project>(&self, name: N) -> Result>; -- cgit v1.2.3