Skip to content

Commit 8dde576

Browse files
committed
Add some more willowprotocol.org links in docs
1 parent 6aa710b commit 8dde576

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

willow-data-model/src/data_model/entry.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ use super::{
55

66
/// A Timestamp is a 64-bit unsigned integer, that is, a natural number between zero (inclusive) and 2^64 - 1 (exclusive).
77
/// Timestamps are to be interpreted as a time in microseconds since the Unix epoch.
8+
/// [Read more](https://willowprotocol.org/specs/data-model/index.html#Timestamp).
89
pub type Timestamp = u64;
910

1011
#[derive(Debug, PartialEq, Eq, Clone)]
@@ -46,7 +47,8 @@ where
4647
{
4748
/// Return if this [`Entry`] is newer than another using their timestamps.
4849
/// Tie-breaks using the Entries' payload digest and payload length otherwise.
49-
pub fn is_newer_than(&self, other: &Entry<N, S, P, PD>) -> bool {
50+
/// [Read more](https://willowprotocol.org/specs/data-model/index.html#entry_newer).
51+
pub fn is_newer_than(&self, other: &Self) -> bool {
5052
other.timestamp < self.timestamp
5153
|| (other.timestamp == self.timestamp && other.payload_digest < self.payload_digest)
5254
|| (other.timestamp == self.timestamp
@@ -60,6 +62,7 @@ where
6062
pub struct UnauthorisedWriteError;
6163

6264
/// An AuthorisedEntry is a pair of an [`Entry`] and [`AuthorisationToken`] for which [`Entry::is_authorised_write`] returns true.
65+
/// [Read more](https://willowprotocol.org/specs/data-model/index.html#AuthorisedEntry).
6366
///
6467
/// ## Type parameters
6568
///

willow-data-model/src/data_model/parameters.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ pub trait PayloadDigest: PartialOrd + Ord + PartialEq + Eq {
2525
}
2626

2727
/// A function that maps an [`Entry`] and an [`AuthorisationToken` (willowprotocol.org)](https://willowprotocol.org/specs/data-model/index.html#AuthorisationToken) to a result indicating whether the `AuthorisationToken` does prove write permission for the [`Entry`].
28+
/// [Read more](https://willowprotocol.org/specs/data-model/index.html#is_authorised_write).
2829
///
2930
/// This function intentionally deviates from the specification's definition (in which `is_authorised_write` returns a `bool`) so that the result of the function cannot be accidentally ignored.
3031
///

0 commit comments

Comments
 (0)