pub enum Scope {
NeverDialable,
PrivateScope,
GlobalUnicast,
}Expand description
How dialable an address is, as three tiers (SPEC.md §5.2). Exhaustive: adding a variant is a
breaking change, since is_usable_reflexive_addr and is_globally_routable are both
defined in terms of an exhaustive match over this enum.
Variants§
NeverDialable
Never a destination: reserved, documentation, loopback, link-local, multicast, unspecified,
benchmarking, discard-only, IETF-assignments, or port 0.
PrivateScope
Dialable only from inside the same site or carrier region: RFC 1918, RFC 6598 CGNAT, IPv6 ULA. A true reading of the node’s position, and never something to advertise to strangers.
GlobalUnicast
Everything else: an address a stranger on the open internet could route to.
Trait Implementations§
impl Copy for Scope
impl Eq for Scope
impl StructuralPartialEq for Scope
Auto Trait Implementations§
impl Freeze for Scope
impl RefUnwindSafe for Scope
impl Send for Scope
impl Sync for Scope
impl Unpin for Scope
impl UnsafeUnpin for Scope
impl UnwindSafe for Scope
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