pub struct PeerEndpoint(/* private fields */);Expand description
A scheme-less host:port advertising the tsoracle service address of a
peer node.
Contract (enforced at construction):
- No
http:///https://prefix. The TLS client silently drops scheme-bearing leader hints (rejects_plaintext_hint) to refuse a transport downgrade, so a scheme-bearing endpoint would make its owner unreachable via follower redirect — a silent prod trap. (Seetsoracle_server::fence::endpoint_is_scheme_lessfor the historical runtime guard this newtype subsumes.) - Non-empty.
- Includes an explicit
:portwith a numeric port in1..=65535. - Bracketed IPv6 supported (
[::1]:50051).
Consumers that need to dial this endpoint prepend http:// / https://
at dial time based on their TLS configuration (see e.g.
tsoracle_client::channel_pool); the endpoint itself is transport-agnostic.
Implementations§
Source§impl PeerEndpoint
impl PeerEndpoint
Trait Implementations§
Source§impl AsRef<str> for PeerEndpoint
impl AsRef<str> for PeerEndpoint
Source§impl Clone for PeerEndpoint
impl Clone for PeerEndpoint
Source§fn clone(&self) -> PeerEndpoint
fn clone(&self) -> PeerEndpoint
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 PeerEndpoint
impl Debug for PeerEndpoint
Source§impl<'de> Deserialize<'de> for PeerEndpoint
Available on crate feature serde only.
impl<'de> Deserialize<'de> for PeerEndpoint
Available on crate feature
serde only.Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for PeerEndpoint
impl Display for PeerEndpoint
impl Eq for PeerEndpoint
Source§impl FromStr for PeerEndpoint
impl FromStr for PeerEndpoint
Source§impl Hash for PeerEndpoint
impl Hash for PeerEndpoint
Source§impl PartialEq for PeerEndpoint
impl PartialEq for PeerEndpoint
Source§fn eq(&self, other: &PeerEndpoint) -> bool
fn eq(&self, other: &PeerEndpoint) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for PeerEndpoint
Available on crate feature serde only.
impl Serialize for PeerEndpoint
Available on crate feature
serde only.impl StructuralPartialEq for PeerEndpoint
Source§impl TryFrom<&str> for PeerEndpoint
impl TryFrom<&str> for PeerEndpoint
Auto Trait Implementations§
impl Freeze for PeerEndpoint
impl RefUnwindSafe for PeerEndpoint
impl Send for PeerEndpoint
impl Sync for PeerEndpoint
impl Unpin for PeerEndpoint
impl UnsafeUnpin for PeerEndpoint
impl UnwindSafe for PeerEndpoint
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