pub struct EndpointSignature { /* private fields */ }Expand description
EndpointAddress record (Type E = 266)
Unified endpoint format that encodes address family, routing, clustering and NAT information in a single flags byte, followed by optional fields.
§Wire format
+-------+-----------------+--------------------+----------------+----------------------------+
| flags | sequence(varint)| addr | load(optional) | signature (optional) |
+-------+-----------------+--------------------+----------------+----------------------------+
| u8 | QUIC varint | see addr layout | f32 | scheme(u16)+len(varint)+N |
+-------+-----------------+--------------------+----------------+----------------------------+
addr layout:
+---------+-----------------------------------------+
| kind | addr fields |
+---------+-----------------------------------------+
| direct | port(u16) + IP(u32/u128) |
+---------+-----------------------------------------+
| nat | outer_port(u16) + outer_IP(u32/u128) |
| | + agent_port(u16) + agent_IP(u32/u128) |
+---------+-----------------------------------------+§flags (u8) bit layout (bit 1 = MSB)
- bit 1 (0x80): FAMILY — address family: 0=IPv4, 1=IPv6
- bit 2 (0x40): MAIN — primary/backup: 1=primary, 0=backup
- bit 3 (0x20): CLUSTERED — multiple hosts share this name; record includes a device sequence number
- bit 4 (0x10): NAT — endpoint is behind NAT; record includes the agent endpoint address
- bit 5 (0x08): LOAD — record carries 1-minute load average (f32)
- bit 6 (0x04): reserved
- bit 7 (0x02): reserved
- bit 8 (0x01): SIGNED — record carries a publisher key signature to prevent DNS poisoning
§Field order
flags → sequence (if CLUSTERED) → addr → agent addr (if NAT) → load (if LOAD) → signature (if SIGNED)
Trait Implementations§
Source§impl Clone for EndpointSignature
impl Clone for EndpointSignature
Source§fn clone(&self) -> EndpointSignature
fn clone(&self) -> EndpointSignature
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 EndpointSignature
impl Debug for EndpointSignature
impl Eq for EndpointSignature
Source§impl Hash for EndpointSignature
impl Hash for EndpointSignature
Source§impl PartialEq for EndpointSignature
impl PartialEq for EndpointSignature
impl StructuralPartialEq for EndpointSignature
Auto Trait Implementations§
impl Freeze for EndpointSignature
impl RefUnwindSafe for EndpointSignature
impl Send for EndpointSignature
impl Sync for EndpointSignature
impl Unpin for EndpointSignature
impl UnsafeUnpin for EndpointSignature
impl UnwindSafe for EndpointSignature
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