Skip to main content

Driver

Trait Driver 

Source
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§

Source

fn get_qset(&self, h: &SCPHash) -> Option<SCPQuorumSet>

Source

fn to_short_string(&self, pk: &SCPNodeID) -> String

Source

fn to_str_key(&self, pk: &SCPNodeID, full_key: bool) -> String

Source

fn from_str_key(&self, s: &str) -> Result<SCPNodeID, String>

Source

fn get_value_string(&self, value: &SCPValue) -> String

Source

fn get_hash_of(&self, opaque: &[u8]) -> SCPHash

Source

fn get_node_weight( &self, node_id: &SCPNodeID, qset: &SCPQuorumSet, is_local_node: bool, ) -> u64

Source

fn compute_hash_node( &self, slot_index: SCPSlotIndex, prev: &SCPValue, is_priority: bool, round_number: SCPCount, node_id: &SCPNodeID, ) -> u64

Source

fn compute_value_hash( &self, slot_index: SCPSlotIndex, prev: &SCPValue, round_number: SCPCount, value: &SCPValue, ) -> u64

Source

fn sign_envelope(&self, env: &mut SCPEnvelope)

Source

fn emit_envelope(&self, env: SCPEnvelope)

Source

fn compute_timeout( &self, round_number: SCPCount, is_nomination: bool, ) -> Duration

Source

fn start_timer( &self, slot_index: SlotIndex, timer: Timer, timeout: Duration, cb: DriverCallback, )

Source

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".

Implementors§