pub trait TrustchainRootHTTP {
// Required methods
fn root_candidates<'life0, 'async_trait>(
date: NaiveDate,
root_candidates: &'life0 RwLock<HashMap<NaiveDate, RootCandidatesResult>>,
) -> Pin<Box<dyn Future<Output = Result<RootCandidatesResult, TrustchainHTTPError>> + Send + 'async_trait>>
where 'life0: 'async_trait;
fn block_timestamp<'async_trait>(
height: u64,
) -> Pin<Box<dyn Future<Output = Result<TimestampResult, TrustchainHTTPError>> + Send + 'async_trait>>;
}
Expand description
An HTTP API for identifying candidate root DIDs.
Required Methods§
Sourcefn root_candidates<'life0, 'async_trait>(
date: NaiveDate,
root_candidates: &'life0 RwLock<HashMap<NaiveDate, RootCandidatesResult>>,
) -> Pin<Box<dyn Future<Output = Result<RootCandidatesResult, TrustchainHTTPError>> + Send + 'async_trait>>where
'life0: 'async_trait,
fn root_candidates<'life0, 'async_trait>(
date: NaiveDate,
root_candidates: &'life0 RwLock<HashMap<NaiveDate, RootCandidatesResult>>,
) -> Pin<Box<dyn Future<Output = Result<RootCandidatesResult, TrustchainHTTPError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Gets a vector of root DID candidates timestamped on a given date.
Sourcefn block_timestamp<'async_trait>(
height: u64,
) -> Pin<Box<dyn Future<Output = Result<TimestampResult, TrustchainHTTPError>> + Send + 'async_trait>>
fn block_timestamp<'async_trait>( height: u64, ) -> Pin<Box<dyn Future<Output = Result<TimestampResult, TrustchainHTTPError>> + Send + 'async_trait>>
Gets a unix timestamp for a given Bitcoin transaction ID.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.