net/netip.Prefix.Bits (method)
16 uses
net/netip (current package)
netip.go#L1310: func (p Prefix) Bits() int { return int(p.bitsPlusOne) - 1 }
netip.go#L1320: func (p Prefix) IsSingleIP() bool { return p.IsValid() && p.Bits() == p.ip.BitLen() }
netip.go#L1335: if c := cmp.Compare(p.Bits(), p2.Bits()); c != 0 {
netip.go#L1408: m, _ := p.ip.Prefix(p.Bits())
netip.go#L1435: return uint32((ip.addr.lo^p.ip.addr.lo)>>((32-p.Bits())&63)) == 0
netip.go#L1440: return ip.addr.xor(p.ip.addr).and(mask6(p.Bits())).isZero()
netip.go#L1460: if pb, ob := p.Bits(), o.Bits(); pb < ob {
netip.go#L1505: b = appendDecimal(b, uint8(p.Bits()))
netip.go#L1553: return append(b, uint8(p.Bits())), nil
netip.go#L1601: b = appendDecimal(b, uint8(p.Bits()))
github.com/jackc/pgx/v5/pgtype
builtin_wrappers.go#L525: Mask: net.CIDRMask(v.Bits(), v.Addr().BitLen()),
builtin_wrappers.go#L552: if v.Addr().BitLen() != v.Bits() {
builtin_wrappers.go#L592: if v.Addr().BitLen() != v.Bits() {
inet.go#L75: ones := prefix.Bits()