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§
Structs§
- Authority
- A
Hostwith optionally a port and/or user-info (UserInfo). - Authority
Ref - Borrowed view of an
Authority— userinfo + host + port, each borrowing into the underlying buffer. Mirrors theHostRef/DomainRef/UserInfoRefpattern for the rest of the address types. - Domain
- A domain.
- Domain
Address - A
Domainwith an associated port (u16) - Domain
Builder - Builder for a
Domain. - Domain
Label Iter - Iterator over the labels of a
Domain. - Domain
Match - Rich result of
DomainTrie::get. - Domain
Ref - Borrowed view into a domain-name byte slice.
- Domain
Trie - An efficient radix tree that can be used to match (sub)domains.
- Host
With OptPort - A
Hostwith optionally a port. - Host
With Port - A
Hostwith an associated port. - Label
- A single DNS label in presentation format.
- Label
Error - Error returned by
Label::from_str. - Proxy
Address - Address of a proxy that can be connected to.
- Push
Error - Error returned by
DomainBuilderwhen a push would violate theDomaininvariant. - Socket
Address - An
IpAddrwith an associated port (u16) - Suffix
Iter - Iterator returned by
DomainLabels::suffix_iter. - Uninterpreted
Host - Reg-name / IP-literal host bytes preserved verbatim.
- Uninterpreted
Host Ref - Borrowed view of an
UninterpretedHost— a wide,Copypointer into pre-validated bytes plus the bracketed flag. MirrorsDomainRef’s relationship toDomain. - User
Info - Raw RFC 3986 userinfo bytes. Cheap to clone.
- User
Info Ref - Borrowed view of a
UserInfo. Carries no ownership of the underlying bytes.
Enums§
- Host
- Either a
Domain, anIpAddr, orUninterpretedHostbytes preserved verbatim from a URI authority. - HostRef
- Borrowed view of a
Host. - Match
Kind - Discriminator for
DomainMatch::kind. - OptPort
- The port component of an authority — tri-state.
Traits§
- AsDomain
Ref - A trait which is used by the
rama-netcrate for places where we wish to have access to a reference to a Domain, directly or indirectly, for non-move purposes. - Domain
Labels - A label-aware view over a domain-like type.
- Into
Domain - A trait which can be use by crates where a Domain is expected, it can however only be implemented by the rama-net rate.