mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-07-31 17:01:58 +00:00
Check documentation intra-link (#1432)
* Fix broken links in rustdoc This fixes all of the rustdoc warnings on nightly. * Check documentation intra-link * Fix config * Fix bad indent * Make nightly explicit * More links fixes * Fix link broken after master merge Co-authored-by: Demi Obenour <48690212+DemiMarie-parity@users.noreply.github.com>
This commit is contained in:
@@ -383,7 +383,7 @@ impl Gossipsub {
|
||||
debug!("Completed JOIN for topic: {:?}", topic_hash);
|
||||
}
|
||||
|
||||
/// Gossipsub LEAVE(topic) - Notifies mesh[topic] peers with PRUNE messages.
|
||||
/// Gossipsub LEAVE(topic) - Notifies mesh\[topic\] peers with PRUNE messages.
|
||||
fn leave(&mut self, topic_hash: &TopicHash) {
|
||||
debug!("Running LEAVE for topic {:?}", topic_hash);
|
||||
|
||||
@@ -880,7 +880,7 @@ impl Gossipsub {
|
||||
}
|
||||
}
|
||||
|
||||
/// Helper function which forwards a message to mesh[topic] peers.
|
||||
/// Helper function which forwards a message to mesh\[topic\] peers.
|
||||
fn forward_msg(&mut self, message: GossipsubMessage, source: &PeerId) {
|
||||
let msg_id = (self.config.message_id_fn)(&message);
|
||||
debug!("Forwarding message: {:?}", msg_id);
|
||||
|
@@ -471,7 +471,7 @@ where
|
||||
/// of the libp2p Kademlia provider API.
|
||||
///
|
||||
/// The results of the (repeated) provider announcements sent by this node are
|
||||
/// delivered in [`KademliaEvent::AddProviderResult`].
|
||||
/// delivered in [`AddProviderResult`].
|
||||
pub fn start_providing(&mut self, key: record::Key) {
|
||||
let record = ProviderRecord::new(key.clone(), self.kbuckets.local_key().preimage().clone());
|
||||
if let Err(err) = self.store.add_provider(record) {
|
||||
@@ -1435,7 +1435,7 @@ impl Quorum {
|
||||
|
||||
/// The events produced by the `Kademlia` behaviour.
|
||||
///
|
||||
/// See [`Kademlia::poll`].
|
||||
/// See [`NetworkBehaviour::poll`].
|
||||
#[derive(Debug)]
|
||||
pub enum KademliaEvent {
|
||||
/// The result of [`Kademlia::bootstrap`].
|
||||
|
@@ -41,10 +41,10 @@
|
||||
//!
|
||||
//! This module implements two periodic jobs:
|
||||
//!
|
||||
//! * [`jobs::PutRecordJob`]: For (re-)publication and (re-)replication of
|
||||
//! * [`PutRecordJob`]: For (re-)publication and (re-)replication of
|
||||
//! regular (value-)records.
|
||||
//!
|
||||
//! * [`jobs::AddProviderJob`]: For (re-)publication of provider records.
|
||||
//! * [`AddProviderJob`]: For (re-)publication of provider records.
|
||||
//! Provider records currently have no separate replication mechanism.
|
||||
//!
|
||||
//! A periodic job is driven like a `Future` or `Stream` by `poll`ing it.
|
||||
|
@@ -32,12 +32,11 @@
|
||||
//! an [`AppliedPending`] result which must be consumed by calling [`take_applied_pending`]
|
||||
//! regularly and / or after performing lookup operations like [`entry`] and [`closest`].
|
||||
//!
|
||||
//! [`entry`]: kbucket::KBucketsTable::entry
|
||||
//! [`closest`]: kbucket::KBucketsTable::closest
|
||||
//! [`AppliedPending`]: kbucket::AppliedPending
|
||||
//! [`KBucketsTable`]: kbucket::KBucketsTable
|
||||
//! [`take_applied_pending`]: kbucket::KBucketsTable::take_applied_pending
|
||||
//! [`PendingEntry`]: kbucket::PendingEntry
|
||||
//! [`entry`]: KBucketsTable::entry
|
||||
//! [`closest`]: KBucketsTable::closest
|
||||
//! [`AppliedPending`]: bucket::AppliedPending
|
||||
//! [`take_applied_pending`]: KBucketsTable::take_applied_pending
|
||||
//! [`PendingEntry`]: entry::PendingEntry
|
||||
|
||||
// [Implementation Notes]
|
||||
//
|
||||
@@ -469,7 +468,7 @@ where
|
||||
/// Together with a known key `a` (e.g. the local key), a random distance `d` for
|
||||
/// this bucket w.r.t `k` gives rise to the corresponding (random) key `b` s.t.
|
||||
/// the XOR distance between `a` and `b` is `d`. In other words, it gives
|
||||
/// rise to a random key falling into this bucket. See [`Key::from_distance`].
|
||||
/// rise to a random key falling into this bucket. See [`key::Key::for_distance`].
|
||||
pub fn rand_distance(&self, rng: &mut impl rand::Rng) -> Distance {
|
||||
self.index.rand_distance(rng)
|
||||
}
|
||||
|
@@ -25,10 +25,6 @@
|
||||
//! The upgrade's output is a `Sink + Stream` of messages. The `Stream` component is used
|
||||
//! to poll the underlying transport for incoming messages, and the `Sink` component
|
||||
//! is used to send messages to remote peers.
|
||||
//!
|
||||
//! [`KademliaProtocolConfig`]: protocol::KademliaProtocolConfig
|
||||
//! [`KadRequestMsg`]: protocol::KadRequestMsg
|
||||
//! [`KadResponseMsg`]: protocol::KadResponseMsg
|
||||
|
||||
use bytes::BytesMut;
|
||||
use codec::UviBytes;
|
||||
|
@@ -36,7 +36,7 @@
|
||||
//!
|
||||
//! A peer iterator can be finished prematurely at any time through `finish`.
|
||||
//!
|
||||
//! [`Finished`]: peers::PeersIterState::Finished
|
||||
//! [`Finished`]: PeersIterState::Finished
|
||||
|
||||
pub mod closest;
|
||||
pub mod fixed;
|
||||
|
@@ -297,7 +297,7 @@ where
|
||||
///
|
||||
/// On success, the upgrade yields the [`PeerId`] obtained from the
|
||||
/// `RemoteIdentity`. The output of this upgrade is thus directly suitable
|
||||
/// for creating an [`authenticated`](libp2p_core::TransportBuilder::authenticate)
|
||||
/// for creating an [`authenticated`](libp2p_core::transport::upgrade::Authenticate)
|
||||
/// transport for use with a [`Network`](libp2p_core::nodes::Network).
|
||||
#[derive(Clone)]
|
||||
pub struct NoiseAuthenticated<P, C: Zeroize, R> {
|
||||
|
@@ -102,8 +102,8 @@ impl PingConfig {
|
||||
/// at any time, i.e. in the absence of ping failures the connection lifetime
|
||||
/// is determined by other protocol handlers.
|
||||
///
|
||||
/// If the maximum number of allowed ping failures is reached, the
|
||||
/// connection is always terminated as a result of [`PingHandler::poll`]
|
||||
/// If the maximum number of allowed ping failures is reached, the
|
||||
/// connection is always terminated as a result of [`ProtocolsHandler::poll`]
|
||||
/// returning an error, regardless of the keep-alive setting.
|
||||
pub fn with_keep_alive(mut self, b: bool) -> Self {
|
||||
self.keep_alive = b;
|
||||
|
@@ -38,7 +38,7 @@
|
||||
//! > it only adds an additional condition for terminating the connection, namely
|
||||
//! > a certain number of failed ping requests.
|
||||
//!
|
||||
//! [`Swarm`]: libp2p_core::Swarm
|
||||
//! [`Swarm`]: libp2p_swarm::Swarm
|
||||
//! [`Transport`]: libp2p_core::Transport
|
||||
|
||||
pub mod protocol;
|
||||
|
@@ -25,7 +25,7 @@
|
||||
//!
|
||||
//! The `SecioConfig` implements [`InboundUpgrade`] and [`OutboundUpgrade`] and thus
|
||||
//! serves as a connection upgrade for authentication of a transport.
|
||||
//! See [`authenticate`](libp2p_core::transport::upgrade::builder::Builder::authenticate).
|
||||
//! See [`authenticate`](libp2p_core::transport::upgrade::Builder::authenticate).
|
||||
//!
|
||||
//! ```no_run
|
||||
//! # fn main() {
|
||||
|
Reference in New Issue
Block a user