Indexer

Trait Indexer 

Source
pub trait Indexer:
    Clone
    + Send
    + Sync
    + 'static {
    type Error: Error + Send + Sync + 'static;

    // Required methods
    fn new(uri: &str, public: Identity) -> Self;
    fn seed_upload(
        &self,
        seed: Seed,
    ) -> impl Future<Output = Result<(), Self::Error>> + Send;
    fn notarized_upload(
        &self,
        notarized: Notarized,
    ) -> impl Future<Output = Result<(), Self::Error>> + Send;
    fn finalized_upload(
        &self,
        finalized: Finalized,
    ) -> impl Future<Output = Result<(), Self::Error>> + Send;
}
Expand description

Trait for interacting with an indexer.

Required Associated Types§

Source

type Error: Error + Send + Sync + 'static

Required Methods§

Source

fn new(uri: &str, public: Identity) -> Self

Create a new indexer with the given URI and public key.

Source

fn seed_upload( &self, seed: Seed, ) -> impl Future<Output = Result<(), Self::Error>> + Send

Upload a seed to the indexer.

Source

fn notarized_upload( &self, notarized: Notarized, ) -> impl Future<Output = Result<(), Self::Error>> + Send

Upload a notarization to the indexer.

Source

fn finalized_upload( &self, finalized: Finalized, ) -> impl Future<Output = Result<(), Self::Error>> + Send

Upload a finalization to the indexer.

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.

Implementations on Foreign Types§

Source§

impl Indexer for Client

Source§

type Error = Error

Source§

fn new(uri: &str, identity: Identity) -> Self

Source§

fn seed_upload( &self, seed: Seed, ) -> impl Future<Output = Result<(), Self::Error>> + Send

Source§

fn notarized_upload( &self, notarized: Notarized, ) -> impl Future<Output = Result<(), Self::Error>> + Send

Source§

fn finalized_upload( &self, finalized: Finalized, ) -> impl Future<Output = Result<(), Self::Error>> + Send

Implementors§