Skip to main content

ProofHandler

Trait ProofHandler 

Source
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§

Source

type Input: DeserializeOwned + Send + 'static

Source

type Output: Serialize + Send + 'static

Source

type Error: Serialize + Send + 'static

Required Methods§

Source

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§

Source

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".

Implementors§