pub trait BftBinding {
type Writer: BftWriter;
type Reader: BftReader;
// Required methods
fn new(config: &Config) -> Self;
fn access<'life0, 'async_trait>(
&'life0 mut self,
node: Node,
) -> Pin<Box<dyn Future<Output = NodeAccess<Self::Writer, Self::Reader>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Expand description
A BftBinding
can be stateful; it provides a new
constructor and
access
to a Node
. Depending on the type of node, access can
be read-write or write-only.
Required Associated Types§
Required Methods§
fn new(config: &Config) -> Self
fn access<'life0, 'async_trait>(
&'life0 mut self,
node: Node,
) -> Pin<Box<dyn Future<Output = NodeAccess<Self::Writer, Self::Reader>> + Send + 'async_trait>>where
Self: '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.