Skip to main content

DiscoveredPeer

Type Alias DiscoveredPeer 

Source
type DiscoveredPeer = (PeerSocketAddr, Client);
Expand description

A successful outbound peer connection attempt or inbound connection handshake.

The Handshake service returns a Result. Only successful connections should be sent on the channel. Errors should be logged or ignored.

We don’t allow any errors in this type, because:

  • The connection limits don’t include failed connections
  • tower::Discover interprets an error as stream termination

Layout§

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.

Size: 104 bytes