Skip to main content

Provider

Trait Provider 

Source
pub trait Provider: Send + Sync {
    // Required methods
    fn label(&self) -> String;
    fn evidence(&self) -> Evidence;
    fn block_encoding(&self) -> BlockEncoding;
    fn supports(&self, method: &str) -> bool;
    fn call(
        &self,
        chain: Chain,
        method: &str,
        args: &[Value],
    ) -> Result<Value, Error>;
}

Required Methods§

Source

fn label(&self) -> String

Source

fn evidence(&self) -> Evidence

Source

fn block_encoding(&self) -> BlockEncoding

Source

fn supports(&self, method: &str) -> bool

Source

fn call( &self, chain: Chain, method: &str, args: &[Value], ) -> Result<Value, Error>

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl Provider for Arc<P2pProvider>

Source§

fn label(&self) -> String

Source§

fn evidence(&self) -> Evidence

Source§

fn block_encoding(&self) -> BlockEncoding

Source§

fn supports(&self, method: &str) -> bool

Source§

fn call( &self, chain: Chain, method: &str, args: &[Value], ) -> Result<Value, Error>

Implementors§