type net/netip.Prefix
64 uses
net/netip (current package)
netip.go#L677: func (ip Addr) Prefix(b int) (Prefix, error) {
netip.go#L679: return Prefix{}, errors.New("negative Prefix bits")
netip.go#L684: return Prefix{}, nil
netip.go#L687: return Prefix{}, errors.New("prefix length " + itoa.Itoa(b) + " too large for IPv4")
netip.go#L692: return Prefix{}, errors.New("prefix length " + itoa.Itoa(b) + " too large for IPv6")
netip.go#L1288: type Prefix struct {
netip.go#L1304: func PrefixFrom(ip Addr, bits int) Prefix {
netip.go#L1309: return Prefix{
netip.go#L1316: func (p Prefix) Addr() Addr { return p.ip }
netip.go#L1321: func (p Prefix) Bits() int { return int(p.bitsPlusOne) - 1 }
netip.go#L1326: func (p Prefix) IsValid() bool { return p.bitsPlusOne > 0 }
netip.go#L1328: func (p Prefix) isZero() bool { return p == Prefix{} }
netip.go#L1331: func (p Prefix) IsSingleIP() bool { return p.IsValid() && p.Bits() == p.ip.BitLen() }
netip.go#L1341: func (p Prefix) compare(p2 Prefix) int {
netip.go#L1367: func ParsePrefix(s string) (Prefix, error) {
netip.go#L1370: return Prefix{}, parsePrefixError{in: s, msg: "no '/'"}
netip.go#L1374: return Prefix{}, parsePrefixError{in: s, msg: err.Error()}
netip.go#L1378: return Prefix{}, parsePrefixError{in: s, msg: "IPv6 zones cannot be present in a prefix"}
netip.go#L1385: return Prefix{}, parsePrefixError{in: s, msg: "bad bits after slash: " + strconv.Quote(bitsStr)}
netip.go#L1390: return Prefix{}, parsePrefixError{in: s, msg: "bad bits after slash: " + strconv.Quote(bitsStr)}
netip.go#L1397: return Prefix{}, parsePrefixError{in: s, msg: "prefix length out of range"}
netip.go#L1404: func MustParsePrefix(s string) Prefix {
netip.go#L1416: func (p Prefix) Masked() Prefix {
netip.go#L1428: func (p Prefix) Contains(ip Addr) bool {
netip.go#L1458: func (p Prefix) Overlaps(o Prefix) bool {
netip.go#L1494: func (p Prefix) AppendTo(b []byte) []byte {
netip.go#L1521: func (p Prefix) AppendText(b []byte) ([]byte, error) {
netip.go#L1528: func (p Prefix) MarshalText() ([]byte, error) {
netip.go#L1545: func (p *Prefix) UnmarshalText(text []byte) error {
netip.go#L1547: *p = Prefix{}
netip.go#L1558: func (p Prefix) AppendBinary(b []byte) ([]byte, error) {
netip.go#L1569: func (p Prefix) MarshalBinary() ([]byte, error) {
netip.go#L1576: func (p *Prefix) UnmarshalBinary(b []byte) error {
netip.go#L1590: func (p Prefix) String() string {
net
addrselect.go#L211: Prefix netip.Prefix
github.com/jackc/pgx/v5/pgtype
builtin_wrappers.go#L518: func (w *netIPNetWrapper) ScanNetipPrefix(v netip.Prefix) error {
builtin_wrappers.go#L531: func (w netIPNetWrapper) NetipPrefixValue() (netip.Prefix, error) {
builtin_wrappers.go#L534: return netip.Prefix{}, errors.New("invalid net.IPNet")
builtin_wrappers.go#L546: func (w *netIPWrapper) ScanNetipPrefix(v netip.Prefix) error {
builtin_wrappers.go#L560: func (w netIPWrapper) NetipPrefixValue() (netip.Prefix, error) {
builtin_wrappers.go#L562: return netip.Prefix{}, nil
builtin_wrappers.go#L567: return netip.Prefix{}, errors.New("invalid net.IP")
builtin_wrappers.go#L573: type netipPrefixWrapper netip.Prefix
builtin_wrappers.go#L575: func (w *netipPrefixWrapper) ScanNetipPrefix(v netip.Prefix) error {
builtin_wrappers.go#L580: func (w netipPrefixWrapper) NetipPrefixValue() (netip.Prefix, error) {
builtin_wrappers.go#L581: return netip.Prefix(w), nil
builtin_wrappers.go#L586: func (w *netipAddrWrapper) ScanNetipPrefix(v netip.Prefix) error {
builtin_wrappers.go#L601: func (w netipAddrWrapper) NetipPrefixValue() (netip.Prefix, error) {
builtin_wrappers.go#L604: return netip.Prefix{}, nil
inet.go#L20: ScanNetipPrefix(v netip.Prefix) error
inet.go#L24: NetipPrefixValue() (netip.Prefix, error)
inet.go#L135: var prefix netip.Prefix
inet.go#L154: return scanner.ScanNetipPrefix(netip.Prefix{})
inet.go#L180: return scanner.ScanNetipPrefix(netip.Prefix{})
inet.go#L183: var prefix netip.Prefix
pgtype.go#L640: case *netip.Prefix:
pgtype.go#L834: return plan.next.Scan(src, (*netipPrefixWrapper)(dst.(*netip.Prefix)))
pgtype.go#L1497: case netip.Prefix:
pgtype.go#L1693: return plan.next.Encode(netipPrefixWrapper(value.(netip.Prefix)), buf)
pgtype_default.go#L208: registerDefaultPgTypeVariants[netip.Prefix](defaultMap, "cidr")