Skip to content

Commit 6277037

Browse files
committed
Add more documentation
1 parent b76854a commit 6277037

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

src/policy/builtin.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ use super::Policy;
55

66
/// A built-in policy with a given name.
77
///
8+
/// The user facing name of this policy can be accessed via the public `name` field.
9+
/// This struct implements `Deref<Target=Policy>`, so using it as a [`Policy`] becomes
10+
/// transparent.
11+
///
812
/// This policy is parsed and lazily initialized on first use.
913
pub struct BuiltInPolicy {
1014
/// The user-friendly name of the built-in policy.

src/policy/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ pub use parsing::ParsePolicyError;
1111
///
1212
/// The Sigsum policy dictates if a signed tree head is considered valid (and by extension, if a
1313
/// Sigsum signature is valid).
14+
///
15+
/// This library contains a bunch of built in policies, ready for use in [`builtin`].
1416
#[derive(Debug, Eq, PartialEq)]
1517
pub struct Policy {
1618
// logs keeps the list of log keys and URLs indexed by keyhash.

0 commit comments

Comments
 (0)