Rust

network

Module

Domain names, IP addresses and URLs.

Contents

use utopia_validators::Domain;
Rust
pub struct Domain

A domain name, not ending with . or -, and allowed by every Restriction.

Also implements Default.
use utopia_validators::Ip;
Rust
pub struct Ip

An IP address of the accepted versions.

use utopia_validators::Port;
Rust
pub struct Port

A published port as Docker accepts it: a port (8080), or a port bound to one host interface (127.0.0.1:8080, [::1]:8080).

use utopia_validators::Restriction;
Rust
pub struct Restriction

A Domain restriction: domains ending with hostname must have exactly levels labels (when set) and must not start with any of prefix_deny_list.

use utopia_validators::Url;
Rust
pub struct Url

A URL, optionally limited to some schemes, to URLs without a fragment, or to https (and http on a loopback host).

With allow_private_use_schemes, URIs of private-use schemes without an authority (com.example.app:/oauth, RFC 8252 §7.1) are valid too.

Also implements Default.
use utopia_validators::IpVersion;
Rust
pub enum IpVersion

The IP versions an Ip validator accepts.