doc(index): document Entry

This commit is contained in:
Kat Marchán 2019-06-30 20:13:40 -07:00
parent 27ce700bd6
commit 982f8ee51a
No known key found for this signature in database
GPG Key ID: AEB529C08A3C7E9E
1 changed files with 5 additions and 0 deletions

View File

@ -24,10 +24,15 @@ const INDEX_VERSION: &str = "5";
/// Represents a cache index entry, which points to content.
#[derive(PartialEq, Debug)]
pub struct Entry {
/// Key this entry is stored under.
pub key: String,
/// Integrity hash for the stored data. Acts as a key into {cache}/content.
pub integrity: Integrity,
/// Timestamp in unix milliseconds when this entry was written.
pub time: u128,
/// Size of data associated with this entry.
pub size: usize,
/// Arbitrary JSON metadata associated with this entry.
pub metadata: Value,
}