Struct network::transport::ConnectionMetadata [−][src]
pub struct ConnectionMetadata {
pub remote_peer_id: PeerId,
pub connection_id: ConnectionId,
pub addr: NetworkAddress,
pub origin: ConnectionOrigin,
pub messaging_protocol: MessagingProtocolVersion,
pub application_protocols: ProtocolIdSet,
pub role: PeerRole,
}Expand description
Metadata associated with an established and fully upgraded connection.
Fields
remote_peer_id: PeerIdconnection_id: ConnectionIdaddr: NetworkAddressorigin: ConnectionOriginmessaging_protocol: MessagingProtocolVersionapplication_protocols: ProtocolIdSetrole: PeerRoleImplementations
pub fn new(
remote_peer_id: PeerId,
connection_id: ConnectionId,
addr: NetworkAddress,
origin: ConnectionOrigin,
messaging_protocol: MessagingProtocolVersion,
application_protocols: ProtocolIdSet,
role: PeerRole
) -> ConnectionMetadata
pub fn mock_with_role_and_origin(
remote_peer_id: PeerId,
role: PeerRole,
origin: ConnectionOrigin
) -> ConnectionMetadata
Trait Implementations
This method tests for self and other values to be equal, and is used
by ==. Read more
This method tests for !=.
Auto Trait Implementations
impl RefUnwindSafe for ConnectionMetadata
impl Send for ConnectionMetadata
impl Sync for ConnectionMetadata
impl Unpin for ConnectionMetadata
impl UnwindSafe for ConnectionMetadata
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span, returning an
Instrumented wrapper. Read more
type Output = T
type Output = T
Should always be Self
Generates a hash used only for tests.