Skip to content

Commit 8c3a3bb

Browse files
committed
doc(relay-builder): specify that relay is shutdown automatically on drop
Signed-off-by: Yuki Kishimoto <[email protected]>
1 parent baa984b commit 8c3a3bb

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

crates/nostr-relay-builder/src/local/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ use crate::builder::RelayBuilder;
1919
use crate::error::Error;
2020

2121
/// A local nostr relay
22+
///
23+
/// This is automatically shutdown when all instances/clones are dropped!
2224
#[derive(Debug, Clone)]
2325
pub struct LocalRelay {
2426
inner: AtomicDestructor<InnerLocalRelay>,

crates/nostr-relay-builder/src/mock.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ use crate::error::Error;
1414
use crate::local::LocalRelay;
1515

1616
/// A mock relay for (unit) tests.
17+
///
18+
/// Check [`LocalRelay`] for more details.
1719
#[derive(Debug, Clone)]
1820
pub struct MockRelay {
1921
local: LocalRelay,

0 commit comments

Comments
 (0)