split_off_peer_id

Function split_off_peer_id 

Source
pub fn split_off_peer_id(address: Multiaddr) -> Result<(PeerId, Multiaddr)>
Expand description

Split off the peer ID from a multiaddress, returning the shortened address and the peer ID.

ยงErrors

  • If the last protocol in the address is not a peer ID.