ClientCompat

Trait ClientCompat 

Source
pub trait ClientCompat: Client + Sized {
    // Required methods
    fn get_compat<'life0, 'async_trait>(
        endpoint_url: &'life0 str,
    ) -> Pin<Box<dyn Future<Output = Result<Self, ChainError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_persistent_compat<'life0, 'async_trait>(
        endpoint_url: &'life0 str,
    ) -> Pin<Box<dyn Future<Output = Result<Self, ChainError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;

    // Provided method
    fn query_compat_mode<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<CompatMode, ChainError>> + Send + 'async_trait>>
       where Self: Sync + 'async_trait,
             'life0: 'async_trait { ... }
}

Required Methods§

Source

fn get_compat<'life0, 'async_trait>( endpoint_url: &'life0 str, ) -> Pin<Box<dyn Future<Output = Result<Self, ChainError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_persistent_compat<'life0, 'async_trait>( endpoint_url: &'life0 str, ) -> Pin<Box<dyn Future<Output = Result<Self, ChainError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

WARNING: This function creates a global static to remember the compat mode for convenience with repeated calls. Once the mode is set, it cannot not be changed no matter how many times you call it.

Provided Methods§

Source

fn query_compat_mode<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<CompatMode, ChainError>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

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 ClientCompat for HttpClient

Source§

fn get_compat<'life0, 'async_trait>( endpoint_url: &'life0 str, ) -> Pin<Box<dyn Future<Output = Result<Self, ChainError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn get_persistent_compat<'life0, 'async_trait>( endpoint_url: &'life0 str, ) -> Pin<Box<dyn Future<Output = Result<Self, ChainError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§