pub struct Tx3Url(/* private fields */);Expand description
A url representing a tx3 p2p endpoint.
Example binding urls:
tx3-st://0.0.0.0:0- bind to all interfaces, os-determined porttx3-rst://relay.holo.host:12345/relay_cert_digest- bind as a relay client to a relay hosted at the given host/port using a tls cert with the given sha256 digest (base64url encoded with no pad)
Example addressable urls after binding:
tx3-st://1.1.1.1:12345/my_node_cert- reachable at host/port with the given node tls cert sha256 digest (base64url encoded no pad)tx3-rst://relay.holo.host:12345/my_node_cert- reachable via relay with the node cert instead of the relay cert
Implementations§
Source§impl Tx3Url
impl Tx3Url
Sourcepub fn tls_cert_digest(&self) -> Option<TlsCertDigest>
pub fn tls_cert_digest(&self) -> Option<TlsCertDigest>
Read the certificate digest (if it exists) from the url
Sourcepub fn with_tls_cert_digest(&self, cert_digest: &TlsCertDigest) -> Self
pub fn with_tls_cert_digest(&self, cert_digest: &TlsCertDigest) -> Self
Generate a new tx3 url with a specific tls cert digest
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Tx3Url
impl<'de> Deserialize<'de> for Tx3Url
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Ord for Tx3Url
impl Ord for Tx3Url
Source§impl PartialOrd for Tx3Url
impl PartialOrd for Tx3Url
impl Eq for Tx3Url
impl StructuralPartialEq for Tx3Url
Auto Trait Implementations§
impl Freeze for Tx3Url
impl RefUnwindSafe for Tx3Url
impl Send for Tx3Url
impl Sync for Tx3Url
impl Unpin for Tx3Url
impl UnwindSafe for Tx3Url
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