Struct ckb_network::network::NetworkState [−][src]
pub struct NetworkState { /* fields omitted */ }Expand description
The global shared state of the network module
Implementations
impl NetworkState[src]
impl NetworkState[src]pub fn from_config(config: NetworkConfig) -> Result<NetworkState, Error>[src]
pub fn from_config(config: NetworkConfig) -> Result<NetworkState, Error>[src]Init from config
pub fn local_peer_id(&self) -> &PeerId[src]
pub fn local_peer_id(&self) -> &PeerId[src]Get peer id of local node
pub fn public_urls(&self, max_urls: usize) -> Vec<(String, u8)>[src]
pub fn public_urls(&self, max_urls: usize) -> Vec<(String, u8)>[src]Get local node’s listen address list
pub fn get_protocol_ids<F: Fn(ProtocolId) -> bool>(
&self,
filter: F
) -> Vec<ProtocolId>[src]
pub fn get_protocol_ids<F: Fn(ProtocolId) -> bool>(
&self,
filter: F
) -> Vec<ProtocolId>[src]use a filter to get protocol id list
pub fn dial_identify(&self, p2p_control: &ServiceControl, addr: Multiaddr)[src]
pub fn dial_identify(&self, p2p_control: &ServiceControl, addr: Multiaddr)[src]Dial just identify protocol
pub fn dial_feeler(&self, p2p_control: &ServiceControl, addr: Multiaddr)[src]
pub fn dial_feeler(&self, p2p_control: &ServiceControl, addr: Multiaddr)[src]Dial just feeler protocol
Auto Trait Implementations
impl !RefUnwindSafe for NetworkState
impl Send for NetworkState
impl Sync for NetworkState
impl Unpin for NetworkState
impl UnwindSafe for NetworkState
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,