pub struct TimestampClient { /* private fields */ }Expand description
A client for interacting with a Time-Stamp Authority
Implementations§
Source§impl TimestampClient
impl TimestampClient
Sourcepub fn new(url: impl Into<String>) -> Self
pub fn new(url: impl Into<String>) -> Self
Create a new TSA client with a 30-second request timeout.
Sourcepub fn new_with_timeout(url: impl Into<String>, timeout: Duration) -> Self
pub fn new_with_timeout(url: impl Into<String>, timeout: Duration) -> Self
Create a TSA client with a custom total HTTP request timeout, including reading the response body.
Sourcepub async fn timestamp_signature(
&self,
signature: &SignatureBytes,
) -> Result<TimestampToken>
pub async fn timestamp_signature( &self, signature: &SignatureBytes, ) -> Result<TimestampToken>
Request a timestamp for a signature
This is the most common use case - timestamps the SHA-256 hash of the signature bytes.
Auto Trait Implementations§
impl !RefUnwindSafe for TimestampClient
impl !UnwindSafe for TimestampClient
impl Freeze for TimestampClient
impl Send for TimestampClient
impl Sync for TimestampClient
impl Unpin for TimestampClient
impl UnsafeUnpin for TimestampClient
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