Trait AsyncTimeStampProvider

Source
pub trait AsyncTimeStampProvider: Sync {
    // Provided methods
    fn time_stamp_service_url(&self) -> Option<String> { ... }
    fn time_stamp_request_headers(&self) -> Option<Vec<(String, String)>> { ... }
    fn time_stamp_request_body(
        &self,
        message: &[u8],
    ) -> Result<Vec<u8>, TimeStampError> { ... }
    fn send_time_stamp_request<'life0, 'life1, 'async_trait>(
        &'life0 self,
        message: &'life1 [u8],
    ) -> Pin<Box<dyn Future<Output = Option<Result<Vec<u8>, TimeStampError>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
}
Expand description

An AsyncTimeStampProvider implementation can contact a RFC 3161 time stamp service and generate a corresponding time stamp for a specific piece of data.

This is identical to TimeStampProvider except for performing its work asynchronously.

Provided Methods§

Source

fn time_stamp_service_url(&self) -> Option<String>

Return the URL for time stamp service.

Source

fn time_stamp_request_headers(&self) -> Option<Vec<(String, String)>>

Additional request headers to pass to the time stamp service.

IMPORTANT: You should not include the “Content-type” header here. That is provided by default.

Source

fn time_stamp_request_body( &self, message: &[u8], ) -> Result<Vec<u8>, TimeStampError>

Generate the request body for the HTTPS request to the time stamp service.

Source

fn send_time_stamp_request<'life0, 'life1, 'async_trait>( &'life0 self, message: &'life1 [u8], ) -> Pin<Box<dyn Future<Output = Option<Result<Vec<u8>, TimeStampError>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Request a RFC 3161 time stamp over an arbitrary data packet.

The default implementation will send the request to the URL provided by Self::time_stamp_service_url(), if any.

Implementors§