pub struct TimestampToken {
pub version: u32,
pub policy: String,
pub message_imprint: MessageImprint,
pub serial_number: String,
pub gen_time: DateTime<Utc>,
pub accuracy: Option<TimestampAccuracy>,
pub ordering: bool,
pub nonce: Option<String>,
pub tsa: Option<String>,
pub signature: Option<String>,
pub raw_token: Option<String>,
}Expand description
A timestamp token from a TSA.
Fields§
§version: u32Version of the token format.
policy: StringPolicy OID under which the token was issued.
message_imprint: MessageImprintThe message imprint that was timestamped.
serial_number: StringSerial number of this token.
gen_time: DateTime<Utc>Time when the timestamp was generated.
accuracy: Option<TimestampAccuracy>Accuracy of the timestamp (optional).
ordering: boolOrdering flag.
nonce: Option<String>Nonce (if provided in request).
tsa: Option<String>TSA name.
signature: Option<String>Base64-encoded signature over the token.
raw_token: Option<String>Base64-encoded DER token (for verification).
Implementations§
Source§impl TimestampToken
impl TimestampToken
Sourcepub fn matches_document(&self, document_id: &DocumentId) -> bool
pub fn matches_document(&self, document_id: &DocumentId) -> bool
Verify that this token matches a document.
Note: This only checks the message imprint, not the cryptographic signature. Full verification requires the TSA’s certificate chain.
Trait Implementations§
Source§impl Clone for TimestampToken
impl Clone for TimestampToken
Source§fn clone(&self) -> TimestampToken
fn clone(&self) -> TimestampToken
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 TimestampToken
impl Debug for TimestampToken
Source§impl<'de> Deserialize<'de> for TimestampToken
impl<'de> Deserialize<'de> for TimestampToken
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 TimestampToken
impl PartialEq for TimestampToken
Source§impl Serialize for TimestampToken
impl Serialize for TimestampToken
impl Eq for TimestampToken
impl StructuralPartialEq for TimestampToken
Auto Trait Implementations§
impl Freeze for TimestampToken
impl RefUnwindSafe for TimestampToken
impl Send for TimestampToken
impl Sync for TimestampToken
impl Unpin for TimestampToken
impl UnsafeUnpin for TimestampToken
impl UnwindSafe for TimestampToken
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.