pub trait Driver: Clone + Debug {
Show 14 methods
// Required methods
fn get_qset(&self, h: &SCPHash) -> Option<SCPQuorumSet>;
fn to_short_string(&self, pk: &SCPNodeID) -> String;
fn to_str_key(&self, pk: &SCPNodeID, full_key: bool) -> String;
fn from_str_key(&self, s: &str) -> Result<SCPNodeID, String>;
fn get_value_string(&self, value: &SCPValue) -> String;
fn get_hash_of(&self, opaque: &[u8]) -> SCPHash;
fn get_node_weight(
&self,
node_id: &SCPNodeID,
qset: &SCPQuorumSet,
is_local_node: bool,
) -> u64;
fn compute_hash_node(
&self,
slot_index: SCPSlotIndex,
prev: &SCPValue,
is_priority: bool,
round_number: SCPCount,
node_id: &SCPNodeID,
) -> u64;
fn compute_value_hash(
&self,
slot_index: SCPSlotIndex,
prev: &SCPValue,
round_number: SCPCount,
value: &SCPValue,
) -> u64;
fn sign_envelope(&self, env: &mut SCPEnvelope);
fn emit_envelope(&self, env: SCPEnvelope);
fn compute_timeout(
&self,
round_number: SCPCount,
is_nomination: bool,
) -> Duration;
fn start_timer(
&self,
slot_index: SlotIndex,
timer: Timer,
timeout: Duration,
cb: DriverCallback,
);
fn stop_timer(&self, slot_index: SlotIndex, timer: Timer);
}Required Methods§
fn get_qset(&self, h: &SCPHash) -> Option<SCPQuorumSet>
fn to_short_string(&self, pk: &SCPNodeID) -> String
fn to_str_key(&self, pk: &SCPNodeID, full_key: bool) -> String
fn from_str_key(&self, s: &str) -> Result<SCPNodeID, String>
fn get_value_string(&self, value: &SCPValue) -> String
fn get_hash_of(&self, opaque: &[u8]) -> SCPHash
fn get_node_weight( &self, node_id: &SCPNodeID, qset: &SCPQuorumSet, is_local_node: bool, ) -> u64
fn compute_hash_node( &self, slot_index: SCPSlotIndex, prev: &SCPValue, is_priority: bool, round_number: SCPCount, node_id: &SCPNodeID, ) -> u64
fn compute_value_hash( &self, slot_index: SCPSlotIndex, prev: &SCPValue, round_number: SCPCount, value: &SCPValue, ) -> u64
fn sign_envelope(&self, env: &mut SCPEnvelope)
fn emit_envelope(&self, env: SCPEnvelope)
fn compute_timeout( &self, round_number: SCPCount, is_nomination: bool, ) -> Duration
fn start_timer( &self, slot_index: SlotIndex, timer: Timer, timeout: Duration, cb: DriverCallback, )
fn stop_timer(&self, slot_index: SlotIndex, timer: Timer)
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".