pub struct TreeHead {
pub size: u64,
pub root: String,
pub at_unix_ms: i64,
}Expand description
What a log signs: how many records it holds and what they hash to.
The pair is the claim. A root alone says nothing about when — the same root can be reissued for ever — and a size alone is not a commitment to content. Together they say: at this moment I held exactly these N records, in this order.
Fields§
§size: u64How many records the log held.
root: Stringroot over those records, hex.
at_unix_ms: i64When the head was issued.
Implementations§
Source§impl TreeHead
impl TreeHead
Sourcepub fn signing_bytes(&self) -> Vec<u8> ⓘ
pub fn signing_bytes(&self) -> Vec<u8> ⓘ
The exact bytes that are signed.
A fixed, line-oriented rendering rather than the JSON: JSON has no canonical form, so signing the serialisation would make the signature depend on a serialiser’s field order. Three lines and a label cannot drift.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TreeHead
impl<'de> Deserialize<'de> for TreeHead
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for TreeHead
impl StructuralPartialEq for TreeHead
Auto Trait Implementations§
impl Freeze for TreeHead
impl RefUnwindSafe for TreeHead
impl Send for TreeHead
impl Sync for TreeHead
impl Unpin for TreeHead
impl UnsafeUnpin for TreeHead
impl UnwindSafe for TreeHead
Blanket Implementations§
impl<T> Allocation for T
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more