pub struct RelayEndpoint {
pub address: SocketAddr,
pub public_key: Ed25519VerifyingKey,
pub name: Option<String>,
pub metadata: Vec<Metadata>,
}Expand description
Relay endpoint information for group participants
Contains the network address and public key needed to connect to a relay server. Multiple relay endpoints can be provided to a group participant for redundancy, with the list order indicating priority preference.
Fields§
§address: SocketAddrNetwork address of the relay server
This is the socket address (IP:port) where the relay server can be reached for QUIC connections.
public_key: Ed25519VerifyingKeyEd25519 public key of the relay server
Used to verify the relay server’s identity during the QUIC TLS handshake. This prevents man-in-the-middle attacks and ensures the client is connecting to the correct relay server.
name: Option<String>Optional human-readable name for the relay
Can be used for display purposes or debugging. Examples: “Primary Relay”, “EU West”, “Backup Server”, etc.
metadata: Vec<Metadata>Additional relay metadata
Can store information like geographic region, performance metrics, supported features, or other relay-specific data.
Implementations§
Source§impl RelayEndpoint
impl RelayEndpoint
Sourcepub fn new(address: SocketAddr, public_key: Ed25519VerifyingKey) -> Self
pub fn new(address: SocketAddr, public_key: Ed25519VerifyingKey) -> Self
Create a new relay endpoint with minimal required fields
Sourcepub fn with_metadata(self, metadata: Metadata) -> Self
pub fn with_metadata(self, metadata: Metadata) -> Self
Add metadata to this relay endpoint
Sourcepub fn display_name(&self) -> String
pub fn display_name(&self) -> String
Get the relay’s display name (name if set, otherwise address)
Trait Implementations§
Source§impl Clone for RelayEndpoint
impl Clone for RelayEndpoint
Source§fn clone(&self) -> RelayEndpoint
fn clone(&self) -> RelayEndpoint
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RelayEndpoint
impl Debug for RelayEndpoint
Source§impl<'de> Deserialize<'de> for RelayEndpoint
impl<'de> Deserialize<'de> for RelayEndpoint
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>,
Source§impl PartialEq for RelayEndpoint
impl PartialEq for RelayEndpoint
Source§impl Serialize for RelayEndpoint
impl Serialize for RelayEndpoint
impl Eq for RelayEndpoint
impl StructuralPartialEq for RelayEndpoint
Auto Trait Implementations§
impl Freeze for RelayEndpoint
impl RefUnwindSafe for RelayEndpoint
impl Send for RelayEndpoint
impl Sync for RelayEndpoint
impl Unpin for RelayEndpoint
impl UnwindSafe for RelayEndpoint
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
§impl<T> Classify for T
impl<T> Classify for T
type Classified = T
fn classify(self) -> T
§impl<T> Classify for T
impl<T> Classify for T
type Classified = T
fn classify(self) -> T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Declassify for T
impl<T> Declassify for T
type Declassified = T
fn declassify(self) -> T
§impl<T> Declassify for T
impl<T> Declassify for T
type Declassified = T
fn declassify(self) -> 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
key and return true if they are equal.