pub struct SyncPeerAddress {
pub url: String,
pub host: String,
pub port: u16,
pub scheme: SyncPeerScheme,
}Expand description
Parsed and normalized address of a synchronization peer.
Fields§
§url: StringCanonical URL including scheme, host, and port.
host: StringDNS name or IP literal without brackets.
port: u16TCP port used by the synchronization endpoint.
scheme: SyncPeerSchemeHTTP transport scheme.
Implementations§
Source§impl SyncPeerAddress
impl SyncPeerAddress
Sourcepub fn parse(peer: &str) -> SyncResult<Self>
pub fn parse(peer: &str) -> SyncResult<Self>
Parses a peer URL or explicit host-and-port seed.
Trait Implementations§
Source§impl Clone for SyncPeerAddress
impl Clone for SyncPeerAddress
Source§fn clone(&self) -> SyncPeerAddress
fn clone(&self) -> SyncPeerAddress
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SyncPeerAddress
impl Debug for SyncPeerAddress
impl Eq for SyncPeerAddress
Source§impl Ord for SyncPeerAddress
impl Ord for SyncPeerAddress
Source§fn cmp(&self, other: &SyncPeerAddress) -> Ordering
fn cmp(&self, other: &SyncPeerAddress) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for SyncPeerAddress
impl PartialEq for SyncPeerAddress
Source§impl PartialOrd for SyncPeerAddress
impl PartialOrd for SyncPeerAddress
impl StructuralPartialEq for SyncPeerAddress
Auto Trait Implementations§
impl Freeze for SyncPeerAddress
impl RefUnwindSafe for SyncPeerAddress
impl Send for SyncPeerAddress
impl Sync for SyncPeerAddress
impl Unpin for SyncPeerAddress
impl UnsafeUnpin for SyncPeerAddress
impl UnwindSafe for SyncPeerAddress
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