type net/netip.Prefix
64 uses
net/netip (current package)
netip.go#L676: func (ip Addr) Prefix(b int) (Prefix, error) {
netip.go#L678: return Prefix{}, errors.New("negative Prefix bits")
netip.go#L683: return Prefix{}, nil
netip.go#L686: return Prefix{}, errors.New("prefix length " + strconv.Itoa(b) + " too large for IPv4")
netip.go#L691: return Prefix{}, errors.New("prefix length " + strconv.Itoa(b) + " too large for IPv6")
netip.go#L1287: type Prefix struct {
netip.go#L1303: func PrefixFrom(ip Addr, bits int) Prefix {
netip.go#L1308: return Prefix{
netip.go#L1315: func (p Prefix) Addr() Addr { return p.ip }
netip.go#L1320: func (p Prefix) Bits() int { return int(p.bitsPlusOne) - 1 }
netip.go#L1325: func (p Prefix) IsValid() bool { return p.bitsPlusOne > 0 }
netip.go#L1327: func (p Prefix) isZero() bool { return p == Prefix{} }
netip.go#L1330: func (p Prefix) IsSingleIP() bool { return p.IsValid() && p.Bits() == p.ip.BitLen() }
netip.go#L1337: func (p Prefix) Compare(p2 Prefix) int {
netip.go#L1368: func ParsePrefix(s string) (Prefix, error) {
netip.go#L1371: return Prefix{}, parsePrefixError{in: s, msg: "no '/'"}
netip.go#L1375: return Prefix{}, parsePrefixError{in: s, msg: err.Error()}
netip.go#L1379: return Prefix{}, parsePrefixError{in: s, msg: "IPv6 zones cannot be present in a prefix"}
netip.go#L1386: return Prefix{}, parsePrefixError{in: s, msg: "bad bits after slash: " + strconv.Quote(bitsStr)}
netip.go#L1391: return Prefix{}, parsePrefixError{in: s, msg: "bad bits after slash: " + strconv.Quote(bitsStr)}
netip.go#L1398: return Prefix{}, parsePrefixError{in: s, msg: "prefix length out of range"}
netip.go#L1405: func MustParsePrefix(s string) Prefix {
netip.go#L1417: func (p Prefix) Masked() Prefix {
netip.go#L1429: func (p Prefix) Contains(ip Addr) bool {
netip.go#L1459: func (p Prefix) Overlaps(o Prefix) bool {
netip.go#L1495: func (p Prefix) AppendTo(b []byte) []byte {
netip.go#L1522: func (p Prefix) AppendText(b []byte) ([]byte, error) {
netip.go#L1529: func (p Prefix) MarshalText() ([]byte, error) {
netip.go#L1546: func (p *Prefix) UnmarshalText(text []byte) error {
netip.go#L1548: *p = Prefix{}
netip.go#L1559: func (p Prefix) AppendBinary(b []byte) ([]byte, error) {
netip.go#L1570: func (p Prefix) MarshalBinary() ([]byte, error) {
netip.go#L1577: func (p *Prefix) UnmarshalBinary(b []byte) error {
netip.go#L1591: 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#L133: var prefix netip.Prefix
inet.go#L152: return scanner.ScanNetipPrefix(netip.Prefix{})
inet.go#L178: return scanner.ScanNetipPrefix(netip.Prefix{})
inet.go#L181: var prefix netip.Prefix
pgtype.go#L642: case *netip.Prefix:
pgtype.go#L836: return plan.next.Scan(src, (*netipPrefixWrapper)(dst.(*netip.Prefix)))
pgtype.go#L1516: case netip.Prefix:
pgtype.go#L1710: return plan.next.Encode(netipPrefixWrapper(value.(netip.Prefix)), buf)
pgtype_default.go#L208: registerDefaultPgTypeVariants[netip.Prefix](defaultMap, "cidr")