Skip to main content

LCV1StateRelayServerDataSource

Trait LCV1StateRelayServerDataSource 

Source
pub trait LCV1StateRelayServerDataSource {
    // Required methods
    fn get_latest_signature_bundle(
        &self,
    ) -> Result<LCV1StateSignaturesBundle, RelayError>;
    fn post_signature<'life0, 'async_trait>(
        &'life0 mut self,
        req: LCV1StateSignatureRequestBody,
    ) -> Pin<Box<dyn Future<Output = Result<(), RelayError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Methods§

Source

fn get_latest_signature_bundle( &self, ) -> Result<LCV1StateSignaturesBundle, RelayError>

Get the latest available signatures bundle.

§Errors

Errors if there’s no available signatures bundle.

Source

fn post_signature<'life0, 'async_trait>( &'life0 mut self, req: LCV1StateSignatureRequestBody, ) -> Pin<Box<dyn Future<Output = Result<(), RelayError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Post a signature to the relay server

§Errors

Errors if the signature is invalid, already posted, or no longer needed.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§