pub trait HostInterface {
// Required methods
fn get_chain_id<'async_trait, S>(
state: S,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
where S: 'async_trait + StateRead;
fn get_revision_number<'async_trait, S>(
state: S,
) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>
where S: 'async_trait + StateRead;
fn get_block_height<'async_trait, S>(
state: S,
) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>
where S: 'async_trait + StateRead;
fn get_block_timestamp<'async_trait, S>(
state: S,
) -> Pin<Box<dyn Future<Output = Result<Time>> + Send + 'async_trait>>
where S: 'async_trait + StateRead;
}
Available on crate feature
component
only.Required Methods§
fn get_chain_id<'async_trait, S>(
state: S,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
S: 'async_trait + StateRead,
fn get_revision_number<'async_trait, S>(
state: S,
) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>where
S: 'async_trait + StateRead,
fn get_block_height<'async_trait, S>(
state: S,
) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>where
S: 'async_trait + StateRead,
fn get_block_timestamp<'async_trait, S>(
state: S,
) -> Pin<Box<dyn Future<Output = Result<Time>> + Send + 'async_trait>>where
S: 'async_trait + StateRead,
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.