Skip to content

Commit 8181008

Browse files
Update sqlx-core/src/postgres/types/mod.rs
Co-authored-by: Austin Bonander <[email protected]>
1 parent bcd7a7c commit 8181008

File tree

1 file changed

+6
-0
lines changed
  • sqlx-core/src/postgres/types

1 file changed

+6
-0
lines changed

sqlx-core/src/postgres/types/mod.rs

+6
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,12 @@
7474
//! | `ipnetwork::IpNetwork` | INET, CIDR |
7575
//! | `std::net::IpAddr` | INET, CIDR |
7676
//!
77+
//! Note that because `IpAddr` does not support network prefixes, it is an error to attempt to decode
78+
//! an `IpAddr` from a `INET` or `CIDR` value with a network prefix smaller than the address' full width:
79+
//! `/32` for IPv4 addresses and `/128` for IPv6 addresses.
80+
//!
81+
//! `IpNetwork` does not have this limitation.
82+
//!
7783
//! ### [`mac_address`](https://crates.io/crates/mac_address)
7884
//!
7985
//! Requires the `mac_address` Cargo feature flag.

0 commit comments

Comments
 (0)