pub struct TokioP2PNetworkClient { /* private fields */ }Implementations§
Source§impl TokioP2PNetworkClient
impl TokioP2PNetworkClient
Sourcepub fn new(
name: impl Into<String>,
initial_peers: Vec<impl Into<String>>,
tokio: Option<Runtime>,
) -> Self
pub fn new( name: impl Into<String>, initial_peers: Vec<impl Into<String>>, tokio: Option<Runtime>, ) -> Self
Owns the passed runtime, using it only if no contextual handle is available;
if None is passed, it creates a runtime with multi-threaded support,
CPU-based thread pool size and all features enabled.
Trait Implementations§
Source§impl Clone for TokioP2PNetworkClient
impl Clone for TokioP2PNetworkClient
Source§fn clone(&self) -> TokioP2PNetworkClient
fn clone(&self) -> TokioP2PNetworkClient
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TokioP2PNetworkClient
impl Debug for TokioP2PNetworkClient
Source§impl P2PNetworkClient for TokioP2PNetworkClient
impl P2PNetworkClient for TokioP2PNetworkClient
fn attempt_send<MsgT, SerializerT>( &mut self, message: MsgT, serializer: SerializerT, node_addr: impl Into<String>, ) -> P2PNetworkResult<()>
Auto Trait Implementations§
impl Freeze for TokioP2PNetworkClient
impl !RefUnwindSafe for TokioP2PNetworkClient
impl Send for TokioP2PNetworkClient
impl Sync for TokioP2PNetworkClient
impl Unpin for TokioP2PNetworkClient
impl !UnwindSafe for TokioP2PNetworkClient
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more