pub struct KademliaProtocolConfig { /* private fields */ }
Expand description

Configuration for a Kademlia connection upgrade. When applied to a connection, turns this connection into a Stream + Sink whose items are of type KadRequestMsg and KadResponseMsg.

Implementations§

Returns the configured protocol name.

Modifies the protocol names used on the wire. Can be used to create incompatibilities between networks on purpose.

Modifies the maximum allowed size of a single Kademlia packet.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
Output after the upgrade has been successfully negotiated and the handshake performed.
Future that performs the handshake with the remote.
Possible error during the handshake.
After we have determined that the remote supports one of the protocols we support, this method is called to start the handshake. Read more
Output after the upgrade has been successfully negotiated and the handshake performed.
Future that performs the handshake with the remote.
Possible error during the handshake.
After we have determined that the remote supports one of the protocols we support, this method is called to start the handshake. Read more
Opaque type representing a negotiable protocol.
Iterator returned by protocol_info.
Returns the list of protocols that are supported. Used during the negotiation process.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Returns a new object that wraps around Self and applies a closure to the Output.
Returns a new object that wraps around Self and applies a closure to the Error.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Returns a new object that wraps around Self and applies a closure to the Output.
Returns a new object that wraps around Self and applies a closure to the Error.
Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.