Skip to main content

Module address

Module address 

Available on crate feature net only.
Expand description

network address types and utilities

This module provides the common language to work with the different kind of formats that network addresses come in, and are used as the building stone for other parts of Rama that have to work with “addresses”, regardless if they are domains or IPs, or have ports explicitly specified or not.

Modules§

domain
ip
IP constants and utilities

Structs§

Authority
A Host with optionally a port and/or user-info (UserInfo).
AuthorityRef
Borrowed view of an Authority — userinfo + host + port, each borrowing into the underlying buffer. Mirrors the HostRef / DomainRef / UserInfoRef pattern for the rest of the address types.
Domain
A domain.
DomainAddress
A Domain with an associated port (u16)
DomainBuilder
Builder for a Domain.
DomainLabelIter
Iterator over the labels of a Domain.
DomainMatch
Rich result of DomainTrie::get.
DomainRef
Borrowed view into a domain-name byte slice.
DomainTrie
An efficient radix tree that can be used to match (sub)domains.
HostWithOptPort
A Host with optionally a port.
HostWithPort
A Host with an associated port.
Label
A single DNS label in presentation format.
LabelError
Error returned by Label::from_str.
ProxyAddress
Address of a proxy that can be connected to.
PushError
Error returned by DomainBuilder when a push would violate the Domain invariant.
SocketAddress
An IpAddr with an associated port (u16)
SuffixIter
Iterator returned by DomainLabels::suffix_iter.
UninterpretedHost
Reg-name / IP-literal host bytes preserved verbatim.
UninterpretedHostRef
Borrowed view of an UninterpretedHost — a wide, Copy pointer into pre-validated bytes plus the bracketed flag. Mirrors DomainRef’s relationship to Domain.
UserInfo
Raw RFC 3986 userinfo bytes. Cheap to clone.
UserInfoRef
Borrowed view of a UserInfo. Carries no ownership of the underlying bytes.

Enums§

Host
Either a Domain, an IpAddr, or UninterpretedHost bytes preserved verbatim from a URI authority.
HostRef
Borrowed view of a Host.
MatchKind
Discriminator for DomainMatch::kind.
OptPort
The port component of an authority — tri-state.

Traits§

AsDomainRef
A trait which is used by the rama-net crate for places where we wish to have access to a reference to a Domain, directly or indirectly, for non-move purposes.
DomainLabels
A label-aware view over a domain-like type.
IntoDomain
A trait which can be use by crates where a Domain is expected, it can however only be implemented by the rama-net rate.