pub struct RelayMap { /* private fields */ }
👎Deprecated: This crate has been renamed from ‘iroh-net’ to ‘iroh’, please use the new crate
Expand description
Configuration of all the relay servers that can be used.
Implementations§
Source§impl RelayMap
impl RelayMap
Sourcepub fn urls(&self) -> impl Iterator<Item = &RelayUrl>
👎Deprecated: This crate has been renamed from ‘iroh-net’ to ‘iroh’, please use the new crate
pub fn urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the sorted relay URLs.
Sourcepub fn empty() -> Self
👎Deprecated: This crate has been renamed from ‘iroh-net’ to ‘iroh’, please use the new crate
pub fn empty() -> Self
Create an empty relay map.
Sourcepub fn nodes(&self) -> impl Iterator<Item = &Arc<RelayNode>>
👎Deprecated: This crate has been renamed from ‘iroh-net’ to ‘iroh’, please use the new crate
pub fn nodes(&self) -> impl Iterator<Item = &Arc<RelayNode>>
Returns an Iterator
over all known nodes.
Sourcepub fn contains_node(&self, url: &RelayUrl) -> bool
👎Deprecated: This crate has been renamed from ‘iroh-net’ to ‘iroh’, please use the new crate
pub fn contains_node(&self, url: &RelayUrl) -> bool
Is this a known node?
Sourcepub fn get_node(&self, url: &RelayUrl) -> Option<&Arc<RelayNode>>
👎Deprecated: This crate has been renamed from ‘iroh-net’ to ‘iroh’, please use the new crate
pub fn get_node(&self, url: &RelayUrl) -> Option<&Arc<RelayNode>>
Get the given node.
Sourcepub fn len(&self) -> usize
👎Deprecated: This crate has been renamed from ‘iroh-net’ to ‘iroh’, please use the new crate
pub fn len(&self) -> usize
How many nodes are known?
Sourcepub fn is_empty(&self) -> bool
👎Deprecated: This crate has been renamed from ‘iroh-net’ to ‘iroh’, please use the new crate
pub fn is_empty(&self) -> bool
Are there any nodes in this map?
Sourcepub fn default_from_node(url: RelayUrl, stun_port: u16) -> Self
👎Deprecated: This crate has been renamed from ‘iroh-net’ to ‘iroh’, please use the new crate
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.
Sourcepub fn from_url(url: RelayUrl) -> Self
👎Deprecated: This crate has been renamed from ‘iroh-net’ to ‘iroh’, please use the new crate
pub fn from_url(url: RelayUrl) -> Self
Sourcepub fn from_nodes(value: impl IntoIterator<Item = RelayNode>) -> Result<Self>
👎Deprecated: This crate has been renamed from ‘iroh-net’ to ‘iroh’, please use the new crate
pub fn from_nodes(value: impl IntoIterator<Item = RelayNode>) -> 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§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.