Skip to content

Commit

Permalink
Updated documentation to reflect inet allows for IpAddr
Browse files Browse the repository at this point in the history
Co-authored-by: Austin Bonander <austin.bonander@gmail.com>
  • Loading branch information
rakshith-ravi and abonander committed Aug 23, 2022
1 parent 2d65c5d commit 8911657
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions sqlx-core/src/postgres/types/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
//!
Expand Down

0 comments on commit 8911657

Please sign in to comment.