Trait iroh_blobs::downloader::Dialer  
source · pub trait Dialer: Stream<Item = (NodeId, Result<Self::Connection>)> + Unpin {
    type Connection: Clone + 'static;
    // Required methods
    fn queue_dial(&mut self, node_id: NodeId);
    fn pending_count(&self) -> usize;
    fn is_pending(&self, node: NodeId) -> bool;
    fn node_id(&self) -> NodeId;
}Available on crate feature 
downloader only.Expand description
Trait modeling a dialer. This allows for IO-less testing.
Required Associated Types§
sourcetype Connection: Clone + 'static
 
type Connection: Clone + 'static
Type of connections returned by the Dialer.
Required Methods§
sourcefn queue_dial(&mut self, node_id: NodeId)
 
fn queue_dial(&mut self, node_id: NodeId)
Dial a node.
sourcefn pending_count(&self) -> usize
 
fn pending_count(&self) -> usize
Get the number of dialing nodes.
sourcefn is_pending(&self, node: NodeId) -> bool
 
fn is_pending(&self, node: NodeId) -> bool
Check if a node is being dialed.