pub struct MerkleEntry {
pub sequence: u64,
pub timestamp: DateTime<Utc>,
pub artifact_type: ArtifactType,
pub artifact_hash: [u8; 32],
pub metadata: Value,
}Expand description
A single entry in the transparency log.
Fields§
§sequence: u64Monotonically increasing sequence number.
timestamp: DateTime<Utc>When the entry was appended.
artifact_type: ArtifactTypeType of artifact.
artifact_hash: [u8; 32]SHA-256 hash of the artifact being recorded.
metadata: ValueOptional deployment-specific metadata (JSON).
Implementations§
Source§impl MerkleEntry
impl MerkleEntry
Sourcepub fn new(
sequence: u64,
artifact_type: ArtifactType,
artifact_hash: [u8; 32],
) -> Self
pub fn new( sequence: u64, artifact_type: ArtifactType, artifact_hash: [u8; 32], ) -> Self
Construct a new entry with the current timestamp.
Sourcepub fn entry_hash(&self) -> [u8; 32]
pub fn entry_hash(&self) -> [u8; 32]
Compute the SHA-256 hash of this entry’s contents (sequence + timestamp + artifact_hash).
Trait Implementations§
Source§impl Clone for MerkleEntry
impl Clone for MerkleEntry
Source§fn clone(&self) -> MerkleEntry
fn clone(&self) -> MerkleEntry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MerkleEntry
impl Debug for MerkleEntry
Source§impl<'de> Deserialize<'de> for MerkleEntry
impl<'de> Deserialize<'de> for MerkleEntry
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
Auto Trait Implementations§
impl Freeze for MerkleEntry
impl RefUnwindSafe for MerkleEntry
impl Send for MerkleEntry
impl Sync for MerkleEntry
impl Unpin for MerkleEntry
impl UnsafeUnpin for MerkleEntry
impl UnwindSafe for MerkleEntry
Blanket Implementations§
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