pub struct HostKey {
pub key: IpAddr,
pub loopback: bool,
}Expand description
How a per-host ceiling counts the peer at one address.
Built by host_key.
Fields§
§key: IpAddrWhat the ceiling counts the peer under: its IPv4 address, or its IPv6 address with the low 64 bits cleared.
Count under this and not under the whole HostKey: HostKey::loopback
is a fact about the address and not part of the host, and two addresses
of one /64 can disagree on it.
loopback: boolWhether the peer is this machine’s own processes, in any form.
A ceiling that exists to stop a stranger from holding the table has nothing to say about loopback, which a test or a sidecar legitimately opens by the thousand; whether to count it anyway is the caller’s decision, and this is what it needs to make it.
Trait Implementations§
impl Copy for HostKey
impl Eq for HostKey
impl StructuralPartialEq for HostKey
Auto Trait Implementations§
impl Freeze for HostKey
impl RefUnwindSafe for HostKey
impl Send for HostKey
impl Sync for HostKey
impl Unpin for HostKey
impl UnsafeUnpin for HostKey
impl UnwindSafe for HostKey
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