pub struct RelayMap { /* private fields */ }
Expand description
Configuration of all the relay servers that can be used.
Implementations§
Source§impl RelayMap
impl RelayMap
Sourcepub fn nodes(&self) -> impl Iterator<Item = &Arc<RelayNode>>
pub fn nodes(&self) -> impl Iterator<Item = &Arc<RelayNode>>
Returns an Iterator
over all known nodes.
Sourcepub fn contains_node(&self, url: &RelayUrl) -> bool
pub fn contains_node(&self, url: &RelayUrl) -> bool
Is this a known node?
Sourcepub fn default_from_node(url: RelayUrl, stun_port: u16) -> Self
pub fn default_from_node(url: RelayUrl, stun_port: u16) -> Self
Creates a new RelayMap
with a single relay server configured.
Allows to set a custom STUN port and different IP addresses for IPv4 and IPv6. If IP addresses are provided, no DNS lookup will be performed.
Sets the port to the default DEFAULT_RELAY_QUIC_PORT
.
Sourcepub fn from_nodes<I: Into<Arc<RelayNode>>>(
value: impl IntoIterator<Item = I>,
) -> Result<Self>
pub fn from_nodes<I: Into<Arc<RelayNode>>>( value: impl IntoIterator<Item = I>, ) -> Result<Self>
Trait Implementations§
impl Eq for RelayMap
impl StructuralPartialEq for RelayMap
Auto Trait Implementations§
impl Freeze for RelayMap
impl RefUnwindSafe for RelayMap
impl Send for RelayMap
impl Sync for RelayMap
impl Unpin for RelayMap
impl UnwindSafe for RelayMap
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> CompatExt for T
impl<T> CompatExt for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more