Trait sube::Backend[][src]

pub trait Backend {
    fn query_storage<'life0, 'life1, 'async_trait>(
        &'life0 self,
        key: &'life1 StorageKey
    ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
fn submit<'life0, 'async_trait, T>(
        &'life0 self,
        ext: T
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
    where
        T: AsRef<[u8]> + Send,
        T: 'async_trait,
        'life0: 'async_trait,
        Self: 'async_trait
;
fn metadata<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<Metadata>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
; }
Expand description

Generic definition of a blockchain backend

#[async_trait]
pub trait Backend {
    async fn query_bytes(&self, key: &StorageKey) -> Result<Vec<u8>>;

    async fn submit<T>(&self, ext: T) -> Result<()>
    where
        T: AsRef<[u8]> + Send;

    async fn metadata(&self) -> Result<Metadata>;
}

Required methods

Get raw storage items form the blockchain

Send a signed extrinsic to the blockchain

Implementors