Crates.io | address |
lib.rs | address |
version | 0.11.0 |
source | src |
created_at | 2019-10-01 03:06:48.913334 |
updated_at | 2024-06-26 12:42:16.015835 |
description | This library aids in processing network addresses. |
homepage | https://github.com/nikdeapen/address |
repository | https://github.com/nikdeapen/address |
max_upload_size | |
id | 169006 |
size | 92,045 |
This library aids in processing network addresses.
There are currently no features. You can use all address types with the following dependency:
[dependencies]
address = "0.11.0"
There are 6 core address types:
IPAddress
which is an enum, and the IPv4Address
& IPv6Address
struct types.SocketAddress
, SocketAddressV4
& SocketAddressV6
struct types.Domain
& DomainRef
types.Endpoint
& EndpointRef
types.Host
& HostRef
types.Authority
& AuthorityRef
types.Address types that are not Copy
have owned and Ref
types (example: Domain
& DomainRef
).
This allows both owned types and types that do not require allocation. They can be easily converted
between each other. Cow
is not used to avoid complicated ownership.
IP addresses and socket addresses are different from the standard library counterparts. They can be
easily converted between each other. There is a difference in IPv6 socket addresses where the
flow_info
and scope_id
are not included as part of the address.