pub struct EndpointAddr {
pub primary: SocketAddr,
pub agent: Option<SocketAddr>,
/* private fields */
}Fields§
§primary: SocketAddrPrimary address (the direct address, or the outer/public address for NAT)
agent: Option<SocketAddr>Agent address used for NAT traversal (present when NAT flag is set)
Implementations§
Source§impl EndpointAddr
impl EndpointAddr
pub fn direct_v4(addr: SocketAddrV4) -> Self
pub fn direct_v6(addr: SocketAddrV6) -> Self
Sourcepub fn nat_v4(outer: SocketAddrV4, agent: SocketAddrV4) -> Self
pub fn nat_v4(outer: SocketAddrV4, agent: SocketAddrV4) -> Self
Create an IPv4 endpoint that requires NAT traversal.
outer is the public address; agent is the NAT helper address.
Sourcepub fn nat_v6(outer: SocketAddrV6, agent: SocketAddrV6) -> Self
pub fn nat_v6(outer: SocketAddrV6, agent: SocketAddrV6) -> Self
Create an IPv6 endpoint that requires NAT traversal.
outer is the public address; agent is the NAT helper address.
Sourcepub fn is_nat(&self) -> bool
pub fn is_nat(&self) -> bool
Returns true if NAT traversal is required (agent address is present).
Sourcepub fn is_clustered(&self) -> bool
pub fn is_clustered(&self) -> bool
Returns true if this domain maps to a cluster of hosts (sequence number is present).
pub fn set_clustered(&mut self, clustered: bool)
pub fn set_load(&mut self, load: Option<f32>)
pub fn verify_signature( &self, spki: SubjectPublicKeyInfoDer<'_>, ) -> Result<bool, VerifyError>
pub fn verify_signature_from_der( &self, cert_der: &[u8], ) -> Result<bool, VerifyError>
pub fn verify_signature_from_pem( &self, cert_pem: &[u8], ) -> Result<bool, VerifyError>
pub fn verify_signature_from_base64( &self, cert_base64: &str, ) -> Result<bool, VerifyError>
pub fn verify_signature_from_file( &self, path: impl AsRef<Path>, ) -> Result<bool, VerifyError>
pub fn is_main(&self) -> bool
pub fn set_main(&mut self, is_main: bool)
pub fn is_signed(&self) -> bool
pub fn set_signed(&mut self, is_signed: bool)
pub fn encpding_size(&self) -> usize
pub fn addr(&self) -> SocketAddr
pub fn agent_addr(&self) -> Option<SocketAddr>
pub fn sequence(&self) -> Option<CertificateSequence>
pub fn normalized_sequence(&self) -> CertificateSequence
pub fn set_sequence(&mut self, sequence: CertificateSequence)
pub fn certificate_chain_key(&self) -> CertificateChainKey
pub fn load(&self) -> Option<f32>
pub fn signature(&self) -> Option<&EndpointSignature>
pub fn signature_base64(&self) -> Option<String>
Trait Implementations§
Source§impl Clone for EndpointAddr
impl Clone for EndpointAddr
Source§fn clone(&self) -> EndpointAddr
fn clone(&self) -> EndpointAddr
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 EndpointAddr
impl Debug for EndpointAddr
Source§impl Display for EndpointAddr
impl Display for EndpointAddr
impl Eq for EndpointAddr
Source§impl Hash for EndpointAddr
impl Hash for EndpointAddr
Source§impl PartialEq for EndpointAddr
impl PartialEq for EndpointAddr
Source§impl TryFrom<EndpointAddr> for EndpointAddr
impl TryFrom<EndpointAddr> for EndpointAddr
Source§impl TryFrom<EndpointAddr> for EndpointAddr
impl TryFrom<EndpointAddr> for EndpointAddr
Auto Trait Implementations§
impl Freeze for EndpointAddr
impl RefUnwindSafe for EndpointAddr
impl Send for EndpointAddr
impl Sync for EndpointAddr
impl Unpin for EndpointAddr
impl UnsafeUnpin for EndpointAddr
impl UnwindSafe for EndpointAddr
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