pub fn is_open(&self, peer_id: &PeerId) -> bool {
		match self.peers.get(peer_id) {
			None => false,
			Some(PeerState::Disabled { open, .. }) => *open,
			Some(PeerState::DisabledPendingEnable { open, .. }) => *open,
			Some(PeerState::Enabled { open, .. }) => *open,
			Some(PeerState::Incoming { .. }) => false,
			Some(PeerState::Requested) => false,
			Some(PeerState::PendingRequest { .. }) => false,
			Some(PeerState::Banned { .. }) => false,
			Some(PeerState::Poisoned) => false,
		}
	}
/// Returns true if we have opened a protocol with the given peer.
Returns true if we have opened a protocol with the given peer.
Returns true if we have opened a protocol with the given peer .
pub fn is_open(&self, peer_id: &PeerId) -> bool {
		match self.peers.get(peer_id) {
			None => false,
			Some(PeerState::Disabled { open, .. }) => *open,
			Some(PeerState::DisabledPendingEnable { open, .. }) => *open,
			Some(PeerState::Enabled { open, .. }) => *open,
			Some(PeerState::Incoming { .. }) => false,
			Some(PeerState::Requested) => false,
			Some(PeerState::PendingRequest { .. }) => false,
			Some(PeerState::Banned { .. }) => false,
			Some(PeerState::Poisoned) => false,
		}
	}
pub fn is_open ( & self , peer_id : & PeerId ) -> bool { match self . peers . get ( peer_id ) { None => false , Some ( PeerState :: Disabled { open , .. } ) => * open , Some ( PeerState :: DisabledPendingEnable { open , .. } ) => * open , Some ( PeerState :: Enabled { open , .. } ) => * open , Some ( PeerState :: Incoming { .. } ) => false , Some ( PeerState :: Requested ) => false , Some ( PeerState :: PendingRequest { .. } ) => false , Some ( PeerState :: Banned { .. } ) => false , Some ( PeerState :: Poisoned ) => false , } }
Returns true if we have opened a protocol with the given peer.
Returns true if we have opened a protocol with the given peer .
&self
peer_id
&PeerId
&self
peer_id
&PeerId