pub trait ValidatorNodeProvider:
'static
+ Send
+ Sync {
type Node: ValidatorNode + MaybeSend + MaybeSync + Clone + 'static;
// Required method
fn make_node(&self, address: &str) -> Result<Self::Node, NodeError>;
// Provided methods
fn make_nodes(
&self,
committee: &Committee,
) -> Result<impl Iterator<Item = (ValidatorPublicKey, Self::Node)> + '_, NodeError> { ... }
fn make_nodes_from_list<A>(
&self,
validators: impl IntoIterator<Item = (ValidatorPublicKey, A)>,
) -> Result<impl Iterator<Item = (ValidatorPublicKey, Self::Node)>, NodeError>
where A: AsRef<str> { ... }
}Expand description
Turn an address into a validator node.
Required Associated Types§
Required Methods§
Provided Methods§
Sourcefn make_nodes(
&self,
committee: &Committee,
) -> Result<impl Iterator<Item = (ValidatorPublicKey, Self::Node)> + '_, NodeError>
fn make_nodes( &self, committee: &Committee, ) -> Result<impl Iterator<Item = (ValidatorPublicKey, Self::Node)> + '_, NodeError>
Creates a node for each validator in the committee.
Sourcefn make_nodes_from_list<A>(
&self,
validators: impl IntoIterator<Item = (ValidatorPublicKey, A)>,
) -> Result<impl Iterator<Item = (ValidatorPublicKey, Self::Node)>, NodeError>
fn make_nodes_from_list<A>( &self, validators: impl IntoIterator<Item = (ValidatorPublicKey, A)>, ) -> Result<impl Iterator<Item = (ValidatorPublicKey, Self::Node)>, NodeError>
Creates a node for each validator in the given list of public keys and addresses.
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.