pub struct RelayTarget {
pub relays: Vec<RelayClient>,
pub hostname: String,
}Expand description
The relays an operator’s announce reaches, and the hostname it announces.
Built once at startup from --relay-hostname/[relay] and held rather
than acted on: naming a relay does not announce anything by itself.
Fields§
§relays: Vec<RelayClient>One client per relay, in the order they were named.
hostname: StringThis server’s own hostname — what gets announced, not the relay’s.
Implementations§
Source§impl RelayTarget
impl RelayTarget
Sourcepub async fn announce(
&self,
resume: bool,
) -> Vec<(String, Result<(), RelayCrawlError>)>
pub async fn announce( &self, resume: bool, ) -> Vec<(String, Result<(), RelayCrawlError>)>
Announces Self::hostname to every relay at once, over
requestCrawl, or notifyOfUpdate when resume is set.
Answers one outcome per relay, each beside that relay’s base URL, in the order the relays were named. One relay failing does not stop the others being asked.
Trait Implementations§
Source§impl Clone for RelayTarget
impl Clone for RelayTarget
Source§fn clone(&self) -> RelayTarget
fn clone(&self) -> RelayTarget
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for RelayTarget
impl !RefUnwindSafe for RelayTarget
impl Send for RelayTarget
impl Sync for RelayTarget
impl Unpin for RelayTarget
impl UnsafeUnpin for RelayTarget
impl !UnwindSafe for RelayTarget
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more