pub struct Hints {
pub direct_tcp: HashSet<DirectHint>,
pub relay: Vec<RelayHint>,
}Expand description
Information about how to find a peer
Fields§
§direct_tcp: HashSet<DirectHint>Hints for direct connection
relay: Vec<RelayHint>List of relay servers
Implementations§
Source§impl Hints
impl Hints
Sourcepub fn new(
direct_tcp: impl IntoIterator<Item = DirectHint>,
relay: impl IntoIterator<Item = RelayHint>,
) -> Self
pub fn new( direct_tcp: impl IntoIterator<Item = DirectHint>, relay: impl IntoIterator<Item = RelayHint>, ) -> Self
Create new hints
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Hints
impl<'de> Deserialize<'de> for Hints
Source§fn deserialize<D>(de: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(de: 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 Hints
impl RefUnwindSafe for Hints
impl Send for Hints
impl Sync for Hints
impl Unpin for Hints
impl UnsafeUnpin for Hints
impl UnwindSafe for Hints
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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