pub trait ProofHandler {
type Input: DeserializeOwned + Send + 'static;
type Output: Serialize + Send + 'static;
type Error: Serialize + Send + 'static;
// Required method
fn prove<'async_trait>(
data: Self::Input,
) -> Pin<Box<dyn Future<Output = Result<Self::Output, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait;
// Provided method
fn handle<'async_trait>(
event: Event,
) -> Pin<Box<dyn Future<Output = Result<Event, Error>> + Send + 'async_trait>>
where Self: Send + 'async_trait { ... }
}Required Associated Types§
type Input: DeserializeOwned + Send + 'static
type Output: Serialize + Send + 'static
type Error: Serialize + Send + 'static
Required Methods§
fn prove<'async_trait>(
data: Self::Input,
) -> Pin<Box<dyn Future<Output = Result<Self::Output, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
Provided Methods§
fn handle<'async_trait>(
event: Event,
) -> Pin<Box<dyn Future<Output = Result<Event, Error>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".