Skip to content

Commit be1ef53

Browse files
committed
Merge "doc: Fix unresolved links"
Pull-Request: #991 Signed-off-by: Yuki Kishimoto <[email protected]>
2 parents 058fdec + a5af93c commit be1ef53

File tree

3 files changed

+21
-18
lines changed

3 files changed

+21
-18
lines changed

crates/nostr-relay-pool/src/pool/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -462,6 +462,9 @@ impl RelayPool {
462462
/// regardless of whether the initial connection succeeds.
463463
///
464464
/// For further details, see the documentation of [`Relay::try_connect`].
465+
///
466+
/// [`RelayStatus::Initialized`]: crate::relay::RelayStatus::Initialized
467+
/// [`RelayStatus::Terminated`]: crate::relay::RelayStatus::Terminated
465468
pub async fn try_connect(&self, timeout: Duration) -> Output<()> {
466469
// Lock with read shared access
467470
let relays = self.inner.atomic.relays.read().await;

crates/nostr-sdk/src/client/mod.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ impl Client {
173173
/// * unset the signer
174174
///
175175
/// This method will NOT:
176-
/// * reset [`Options`]
176+
/// * reset [`ClientOptions`]
177177
/// * remove the database
178178
/// * clear the gossip graph
179179
pub async fn reset(&self) {
@@ -305,7 +305,7 @@ impl Client {
305305
/// If are set pool subscriptions, the new added relay will inherit them. Use [`Client::subscribe_to`] method instead of [`Client::subscribe`],
306306
/// to avoid to set pool subscriptions.
307307
///
308-
/// This method use previously set or default [`Options`] to configure the [`Relay`] (ex. set proxy, set min POW, set relay limits, ...).
308+
/// This method use previously set or default [`ClientOptions`] to configure the [`Relay`] (ex. set proxy, set min POW, set relay limits, ...).
309309
/// To use custom [`RelayOptions`] use [`RelayPool::add_relay`].
310310
///
311311
/// Connection is **NOT** automatically started with relay, remember to call [`Client::connect`]!
@@ -525,7 +525,7 @@ impl Client {
525525
/// So remember to unsubscribe when you no longer need it. You can get all your active (non-auto-closing) subscriptions
526526
/// by calling `client.subscriptions().await`.
527527
///
528-
/// If `gossip` is enabled (see [`Options::gossip`]) the events will be requested also to
528+
/// If `gossip` is enabled (see [`ClientOptions::gossip`]) the events will be requested also to
529529
/// NIP65 relays (automatically discovered) of public keys included in filters (if any).
530530
///
531531
/// # Auto-closing subscription
@@ -575,7 +575,7 @@ impl Client {
575575

576576
/// Subscribe to filters with custom [SubscriptionId]
577577
///
578-
/// If `gossip` is enabled (see [`Options::gossip`]) the events will be requested also to
578+
/// If `gossip` is enabled (see [`ClientOptions::gossip`]) the events will be requested also to
579579
/// NIP65 relays (automatically discovered) of public keys included in filters (if any).
580580
///
581581
/// # Auto-closing subscription
@@ -679,7 +679,7 @@ impl Client {
679679

680680
/// Sync events with relays (negentropy reconciliation)
681681
///
682-
/// If `gossip` is enabled (see [`Options::gossip`]) the events will be reconciled also from
682+
/// If `gossip` is enabled (see [`ClientOptions::gossip`]) the events will be reconciled also from
683683
/// NIP65 relays (automatically discovered) of public keys included in filters (if any).
684684
///
685685
/// <https://github.com/hoytech/negentropy>
@@ -723,7 +723,7 @@ impl Client {
723723
///
724724
/// # Gossip
725725
///
726-
/// If `gossip` is enabled (see [`Options::gossip`]) the events will be requested also to
726+
/// If `gossip` is enabled (see [`ClientOptions::gossip`]) the events will be requested also to
727727
/// NIP65 relays (automatically discovered) of public keys included in filters (if any).
728728
///
729729
/// # Example
@@ -791,15 +791,15 @@ impl Client {
791791
///
792792
/// # Gossip
793793
///
794-
/// If `gossip` is enabled (see [`Options::gossip`]) the events will be requested also to
794+
/// If `gossip` is enabled (see [`ClientOptions::gossip`]) the events will be requested also to
795795
/// NIP65 relays (automatically discovered) of public keys included in filters (if any).
796796
///
797797
/// # Notes and alternative example
798798
///
799799
/// This method will be deprecated in the future!
800800
/// This is a temporary solution for who still want to query events both from database and relays and merge the result.
801801
/// The optimal solution is to execute a [`Client::sync`] to reconcile missing events, [`Client::subscribe`] to get all
802-
/// new future events, [`NostrEventsDatabase::query`] to query stored events and [`Client::handle_notifications`] to listen-for/handle new events (i.e. to know when update the UI).
802+
/// new future events, [`NostrDatabase::query`] to query stored events and [`Client::handle_notifications`] to listen-for/handle new events (i.e. to know when update the UI).
803803
/// This will allow very fast queries, low bandwidth usage (depending on how many events the client have to reconcile) and a lower load on the relays.
804804
///
805805
/// You can obtain the same result with:
@@ -851,7 +851,7 @@ impl Client {
851851
///
852852
/// # Gossip
853853
///
854-
/// If `gossip` is enabled (see [`Options::gossip`]) the events will be streamed also from
854+
/// If `gossip` is enabled (see [`ClientOptions::gossip`]) the events will be streamed also from
855855
/// NIP65 relays (automatically discovered) of public keys included in filters (if any).
856856
pub async fn stream_events(
857857
&self,
@@ -951,7 +951,7 @@ impl Client {
951951
///
952952
/// # Gossip
953953
///
954-
/// If `gossip` is enabled (see [`Options::gossip`]):
954+
/// If `gossip` is enabled (see [`ClientOptions::gossip`]):
955955
/// - the [`Event`] will be sent also to NIP65 relays (automatically discovered);
956956
/// - the gossip data will be updated, if the [`Event`] is a NIP17/NIP65 relay list.
957957
#[inline]
@@ -972,7 +972,7 @@ impl Client {
972972
///
973973
/// # Gossip
974974
///
975-
/// If `gossip` is enabled (see [`Options::gossip`]) and the [`Event`] is a NIP17/NIP65 relay list,
975+
/// If `gossip` is enabled (see [`ClientOptions::gossip`]) and the [`Event`] is a NIP17/NIP65 relay list,
976976
/// the gossip data will be updated.
977977
#[inline]
978978
pub async fn send_event_to<I, U>(
@@ -1178,7 +1178,7 @@ impl Client {
11781178

11791179
/// Send a private direct message
11801180
///
1181-
/// If `gossip` is enabled (see [`Options::gossip`]) the message will be sent to the NIP17 relays (automatically discovered).
1181+
/// If `gossip` is enabled (see [`ClientOptions::gossip`]) the message will be sent to the NIP17 relays (automatically discovered).
11821182
/// If gossip is not enabled will be sent to all relays with [`RelayServiceFlags::WRITE`] flag.
11831183
///
11841184
/// This method requires a [`NostrSigner`].

crates/nostr/src/nips/nip46.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,7 @@ impl NostrConnectMessage {
638638
}
639639
}
640640

641-
/// Compose [`NostrConnectMessage::Response`] from [`Response`].
641+
/// Compose [`NostrConnectMessage::Response`] from [`NostrConnectResponse`].
642642
#[inline]
643643
pub fn response<S>(req_id: S, res: NostrConnectResponse) -> Self
644644
where
@@ -651,7 +651,7 @@ impl NostrConnectMessage {
651651
}
652652
}
653653

654-
/// Get [`Message`] id
654+
/// Get [`NostrConnectMessage`] id
655655
#[inline]
656656
pub fn id(&self) -> &str {
657657
match self {
@@ -660,19 +660,19 @@ impl NostrConnectMessage {
660660
}
661661
}
662662

663-
/// Check if the current [`Message`] is a request.
663+
/// Check if the current [`NostrConnectMessage`] is a request.
664664
#[inline]
665665
pub fn is_request(&self) -> bool {
666666
matches!(self, Self::Request { .. })
667667
}
668668

669-
/// Check if the current [`Message`] is a response.
669+
/// Check if the current [`NostrConnectMessage`] is a response.
670670
#[inline]
671671
pub fn is_response(&self) -> bool {
672672
matches!(self, Self::Response { .. })
673673
}
674674

675-
/// Convert [`NostrConnectMessage::Request`] to [`Request`].
675+
/// Convert [`NostrConnectMessage::Request`] to [`NostrConnectRequest`].
676676
#[inline]
677677
pub fn to_request(self) -> Result<NostrConnectRequest, Error> {
678678
match self {
@@ -683,7 +683,7 @@ impl NostrConnectMessage {
683683
}
684684
}
685685

686-
/// Convert [`NostrConnectMessage::Response`] to [`Response`].
686+
/// Convert [`NostrConnectMessage::Response`] to [`NostrConnectResponse`].
687687
#[inline]
688688
pub fn to_response(self, method: NostrConnectMethod) -> Result<NostrConnectResponse, Error> {
689689
match self {

0 commit comments

Comments
 (0)