pub trait ClientHandle {
// Required method
fn execute_with<T: ExecuteWithClient>(&self, t: T) -> T::Output;
}
Expand description
A handle to a Moonbeam client instance.
The Moonbeam service supports multiple different runtimes (Moonbase, Moonbeam itself, etc). As each runtime has a specialized client, we need to hide them behind a trait. This is this trait.
When wanting to work with the inner client, you need to use execute_with
.
Required Methods§
Sourcefn execute_with<T: ExecuteWithClient>(&self, t: T) -> T::Output
fn execute_with<T: ExecuteWithClient>(&self, t: T) -> T::Output
Execute the given something with the client.
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.