Updated documentation to reflect inet allows for IpAddr (#2053)

Co-authored-by: Austin Bonander <austin.bonander@gmail.com>

Co-authored-by: Austin Bonander <austin.bonander@gmail.com>
This commit is contained in:
Rakshith Ravi 2022-08-24 04:15:29 +05:30 committed by GitHub
parent 2d65c5de80
commit 3f7111f05d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -72,6 +72,13 @@
//! | Rust type | Postgres type(s) |
//! |---------------------------------------|------------------------------------------------------|
//! | `ipnetwork::IpNetwork` | INET, CIDR |
//! | `std::net::IpAddr` | INET, CIDR |
//!
//! Note that because `IpAddr` does not support network prefixes, it is an error to attempt to decode
//! an `IpAddr` from a `INET` or `CIDR` value with a network prefix smaller than the address' full width:
//! `/32` for IPv4 addresses and `/128` for IPv6 addresses.
//!
//! `IpNetwork` does not have this limitation.
//!
//! ### [`mac_address`](https://crates.io/crates/mac_address)
//!