pub struct TimestampRecord {
pub method: TimestampMethod,
pub authority: String,
pub time: DateTime<Utc>,
pub token: String,
pub transaction_id: Option<String>,
}Expand description
Record of a timestamp anchoring.
Fields§
§method: TimestampMethodTimestamp method used.
Name or URL of the timestamp authority.
time: DateTime<Utc>Time recorded by the authority.
token: StringBase64-encoded timestamp token or proof.
transaction_id: Option<String>Transaction ID or reference (for blockchain anchors).
Implementations§
Source§impl TimestampRecord
impl TimestampRecord
Sourcepub fn rfc3161(
authority: impl Into<String>,
time: DateTime<Utc>,
token: impl Into<String>,
) -> Self
pub fn rfc3161( authority: impl Into<String>, time: DateTime<Utc>, token: impl Into<String>, ) -> Self
Create a new RFC 3161 timestamp record.
Sourcepub fn bitcoin(
time: DateTime<Utc>,
token: impl Into<String>,
tx_id: impl Into<String>,
) -> Self
pub fn bitcoin( time: DateTime<Utc>, token: impl Into<String>, tx_id: impl Into<String>, ) -> Self
Create a new Bitcoin timestamp record.
Sourcepub fn ethereum(
time: DateTime<Utc>,
token: impl Into<String>,
tx_id: impl Into<String>,
) -> Self
pub fn ethereum( time: DateTime<Utc>, token: impl Into<String>, tx_id: impl Into<String>, ) -> Self
Create a new Ethereum timestamp record.
Sourcepub fn open_timestamps(time: DateTime<Utc>, token: impl Into<String>) -> Self
pub fn open_timestamps(time: DateTime<Utc>, token: impl Into<String>) -> Self
Create a new OpenTimestamps record.
Sourcepub fn matches_document(&self, _document_id: &DocumentId) -> bool
pub fn matches_document(&self, _document_id: &DocumentId) -> bool
Verify that this timestamp matches a document ID.
Note: This only checks the token format, not cryptographic validity. Full verification requires the timestamp authority’s certificate or blockchain access.
Trait Implementations§
Source§impl Clone for TimestampRecord
impl Clone for TimestampRecord
Source§fn clone(&self) -> TimestampRecord
fn clone(&self) -> TimestampRecord
Returns a duplicate of the value. Read more
1.0.0 · 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 TimestampRecord
impl Debug for TimestampRecord
Source§impl<'de> Deserialize<'de> for TimestampRecord
impl<'de> Deserialize<'de> for TimestampRecord
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
Source§impl PartialEq for TimestampRecord
impl PartialEq for TimestampRecord
Source§impl Serialize for TimestampRecord
impl Serialize for TimestampRecord
impl Eq for TimestampRecord
impl StructuralPartialEq for TimestampRecord
Auto Trait Implementations§
impl Freeze for TimestampRecord
impl RefUnwindSafe for TimestampRecord
impl Send for TimestampRecord
impl Sync for TimestampRecord
impl Unpin for TimestampRecord
impl UnsafeUnpin for TimestampRecord
impl UnwindSafe for TimestampRecord
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.