mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-28 17:21:34 +00:00
fix: remove redundant intra-doc link
The recent Rust release introduced a new rustdoc lint which is currently failing CI. Pull-Request: #4602.
This commit is contained in:
@ -144,7 +144,7 @@ pub trait NetworkBehaviour: 'static {
|
||||
/// This is invoked once another peer has successfully dialed us.
|
||||
///
|
||||
/// At this point, we have verified their [`PeerId`] and we know, which particular [`Multiaddr`] succeeded in the dial.
|
||||
/// In order to actually use this connection, this function must return a [`ConnectionHandler`](crate::ConnectionHandler).
|
||||
/// In order to actually use this connection, this function must return a [`ConnectionHandler`].
|
||||
/// Returning an error will immediately close the connection.
|
||||
fn handle_established_inbound_connection(
|
||||
&mut self,
|
||||
@ -180,7 +180,7 @@ pub trait NetworkBehaviour: 'static {
|
||||
///
|
||||
/// This is invoked once we have successfully dialed a peer.
|
||||
/// At this point, we have verified their [`PeerId`] and we know, which particular [`Multiaddr`] succeeded in the dial.
|
||||
/// In order to actually use this connection, this function must return a [`ConnectionHandler`](crate::ConnectionHandler).
|
||||
/// In order to actually use this connection, this function must return a [`ConnectionHandler`].
|
||||
/// Returning an error will immediately close the connection.
|
||||
fn handle_established_outbound_connection(
|
||||
&mut self,
|
||||
@ -193,7 +193,7 @@ pub trait NetworkBehaviour: 'static {
|
||||
/// Informs the behaviour about an event from the [`Swarm`](crate::Swarm).
|
||||
fn on_swarm_event(&mut self, event: FromSwarm<Self::ConnectionHandler>);
|
||||
|
||||
/// Informs the behaviour about an event generated by the [`ConnectionHandler`](crate::ConnectionHandler)
|
||||
/// Informs the behaviour about an event generated by the [`ConnectionHandler`]
|
||||
/// dedicated to the peer identified by `peer_id`. for the behaviour.
|
||||
///
|
||||
/// The [`PeerId`] is guaranteed to be in a connected state. In other words,
|
||||
@ -260,20 +260,20 @@ pub enum ToSwarm<TOutEvent, TInEvent> {
|
||||
/// Instructs the `Swarm` to send an event to the handler dedicated to a
|
||||
/// connection with a peer.
|
||||
///
|
||||
/// If the `Swarm` is connected to the peer, the message is delivered to the
|
||||
/// [`ConnectionHandler`](crate::ConnectionHandler) instance identified by the peer ID and connection ID.
|
||||
/// If the `Swarm` is connected to the peer, the message is delivered to the [`ConnectionHandler`]
|
||||
/// instance identified by the peer ID and connection ID.
|
||||
///
|
||||
/// If the specified connection no longer exists, the event is silently dropped.
|
||||
///
|
||||
/// Typically the connection ID given is the same as the one passed to
|
||||
/// [`NetworkBehaviour::on_connection_handler_event`], i.e. whenever the behaviour wishes to
|
||||
/// respond to a request on the same connection (and possibly the same
|
||||
/// substream, as per the implementation of [`ConnectionHandler`](crate::ConnectionHandler)).
|
||||
/// substream, as per the implementation of [`ConnectionHandler`]).
|
||||
///
|
||||
/// Note that even if the peer is currently connected, connections can get closed
|
||||
/// at any time and thus the event may not reach a handler.
|
||||
NotifyHandler {
|
||||
/// The peer for whom a [`ConnectionHandler`](crate::ConnectionHandler) should be notified.
|
||||
/// The peer for whom a [`ConnectionHandler`] should be notified.
|
||||
peer_id: PeerId,
|
||||
/// The options w.r.t. which connection handler to notify of the event.
|
||||
handler: NotifyHandler,
|
||||
@ -309,10 +309,10 @@ pub enum ToSwarm<TOutEvent, TInEvent> {
|
||||
///
|
||||
/// Note: Closing a connection via
|
||||
/// [`ToSwarm::CloseConnection`] does not inform the
|
||||
/// corresponding [`ConnectionHandler`](crate::ConnectionHandler).
|
||||
/// Closing a connection via a [`ConnectionHandler`](crate::ConnectionHandler) can be done
|
||||
/// either in a collaborative manner across [`ConnectionHandler`](crate::ConnectionHandler)s
|
||||
/// with [`ConnectionHandler::connection_keep_alive`](crate::ConnectionHandler::connection_keep_alive) or directly with
|
||||
/// corresponding [`ConnectionHandler`].
|
||||
/// Closing a connection via a [`ConnectionHandler`] can be done
|
||||
/// either in a collaborative manner across [`ConnectionHandler`]s
|
||||
/// with [`ConnectionHandler::connection_keep_alive`] or directly with
|
||||
/// [`ConnectionHandlerEvent::Close`](crate::ConnectionHandlerEvent::Close).
|
||||
CloseConnection {
|
||||
/// The peer to disconnect.
|
||||
|
@ -144,8 +144,7 @@ where
|
||||
/// Note: This only enforces a limit on the number of concurrently
|
||||
/// negotiating inbound streams. The total number of inbound streams on a
|
||||
/// connection is the sum of negotiating and negotiated streams. A limit on
|
||||
/// the total number of streams can be enforced at the
|
||||
/// [`StreamMuxerBox`](libp2p_core::muxing::StreamMuxerBox) level.
|
||||
/// the total number of streams can be enforced at the [`StreamMuxerBox`] level.
|
||||
max_negotiating_inbound_streams: usize,
|
||||
/// Contains all upgrades that are waiting for a new outbound substream.
|
||||
///
|
||||
|
@ -981,7 +981,7 @@ impl PoolConfig {
|
||||
/// delivery to the connection handler.
|
||||
///
|
||||
/// When the buffer for a particular connection is full, `notify_handler` will no
|
||||
/// longer be able to deliver events to the associated [`Connection`](super::Connection),
|
||||
/// longer be able to deliver events to the associated [`Connection`],
|
||||
/// thus exerting back-pressure on the connection and peer API.
|
||||
pub(crate) fn with_notify_handler_buffer_size(mut self, n: NonZeroUsize) -> Self {
|
||||
self.task_command_buffer_size = n.get() - 1;
|
||||
|
@ -159,8 +159,7 @@ use std::{
|
||||
|
||||
/// Substream for which a protocol has been chosen.
|
||||
///
|
||||
/// Implements the [`AsyncRead`](futures::io::AsyncRead) and
|
||||
/// [`AsyncWrite`](futures::io::AsyncWrite) traits.
|
||||
/// Implements the [`AsyncRead`] and [`AsyncWrite`] traits.
|
||||
#[deprecated(note = "The 'substream' terminology is deprecated. Use 'Stream' instead")]
|
||||
pub type NegotiatedSubstream = Stream;
|
||||
|
||||
@ -1515,8 +1514,7 @@ where
|
||||
/// Note: This only enforces a limit on the number of concurrently
|
||||
/// negotiating inbound streams. The total number of inbound streams on a
|
||||
/// connection is the sum of negotiating and negotiated streams. A limit on
|
||||
/// the total number of streams can be enforced at the
|
||||
/// [`StreamMuxerBox`](libp2p_core::muxing::StreamMuxerBox) level.
|
||||
/// the total number of streams can be enforced at the [`StreamMuxerBox`] level.
|
||||
pub fn max_negotiating_inbound_streams(mut self, v: usize) -> Self {
|
||||
self.pool_config = self.pool_config.with_max_negotiating_inbound_streams(v);
|
||||
self
|
||||
|
Reference in New Issue
Block a user