pub struct DiscoveryPeer {
pub relay_url: Option<String>,
pub addrs: Vec<String>,
}Expand description
A single static peer entry for DiscoveryConfig::peers. To be useful at
least one of Self::relay_url / Self::addrs should be set — an
id-only entry yields a peer with no transport addresses to dial.
Fields§
§relay_url: Option<String>This peer’s home relay URL (becomes a relay transport address).
addrs: Vec<String>Direct socket addresses for this peer (host:port, each becomes a
direct transport address). Each entry is parsed as a SocketAddr at
resolution.
Trait Implementations§
Source§impl Clone for DiscoveryPeer
impl Clone for DiscoveryPeer
Source§impl Debug for DiscoveryPeer
impl Debug for DiscoveryPeer
Source§impl Default for DiscoveryPeer
impl Default for DiscoveryPeer
Source§impl<'de> Deserialize<'de> for DiscoveryPeer
impl<'de> Deserialize<'de> for DiscoveryPeer
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for DiscoveryPeer
impl RefUnwindSafe for DiscoveryPeer
impl Send for DiscoveryPeer
impl Sync for DiscoveryPeer
impl Unpin for DiscoveryPeer
impl UnsafeUnpin for DiscoveryPeer
impl UnwindSafe for DiscoveryPeer
Blanket Implementations§
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
impl<'de, T> BorrowedRpcObject<'de> for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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