OxL Reference

method IpAddr.isLoopback

Whether the address is ::1 or in 127.0.0.0/8.

Example:

oxl✓ checked in CI
use std.net { IpAddr }

fn main() io {
  print("{IpAddr.loopback().isLoopback()} {IpAddr.any().isLoopback()}")
}
Output
true false
pub(api) fn isLoopback() -> bool

Since. 1.0.0-beta

Returns

bool

Effects

none declared (pure unless the body says otherwise)

Defined in: std/net/net.oxl:233

See also