summaryrefslogtreecommitdiff
path: root/docs/src/lib.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2023-05-17 14:31:55 +0200
committerLaurenz <laurmaedje@gmail.com>2023-05-17 14:31:55 +0200
commit8971588486b6ffa9269344b4bda71de86af9d908 (patch)
tree420a51975c654741c99d00b7869a58cf291f3a6a /docs/src/lib.rs
parentd14d1e867f83de631e7252ec5bdb2aa2dd870c8e (diff)
Externalize contributor fetching
Diffstat (limited to 'docs/src/lib.rs')
-rw-r--r--docs/src/lib.rs10
1 files changed, 9 insertions, 1 deletions
diff --git a/docs/src/lib.rs b/docs/src/lib.rs
index 3fcfecd1..fcf3610c 100644
--- a/docs/src/lib.rs
+++ b/docs/src/lib.rs
@@ -3,7 +3,7 @@
mod contribs;
mod html;
-pub use contribs::contributors;
+pub use contribs::{contributors, Author, Commit};
pub use html::Html;
use std::fmt::{self, Debug, Formatter};
@@ -72,6 +72,9 @@ pub trait Resolver {
/// Produce HTML for an example.
fn example(&self, source: Html, frames: &[Frame]) -> Html;
+
+ /// Determine the commits between two tags.
+ fn commits(&self, from: &str, to: &str) -> Vec<Commit>;
}
/// Details about a documentation page and its children.
@@ -81,6 +84,7 @@ pub struct PageModel {
pub title: String,
pub description: String,
pub part: Option<&'static str>,
+ pub outline: Vec<OutlineItem>,
pub body: BodyModel,
pub children: Vec<Self>,
}
@@ -784,5 +788,9 @@ mod tests {
fn image(&self, _: &str, _: &[u8]) -> String {
String::new()
}
+
+ fn commits(&self, _: &str, _: &str) -> Vec<Commit> {
+ vec![]
+ }
}
}