net/netip.Prefix.Bits (method)
16 uses
net/netip (current package)
netip.go#L1320: func (p Prefix) Bits() int { return int(p.bitsPlusOne) - 1 }
netip.go#L1330: func (p Prefix) IsSingleIP() bool { return p.IsValid() && p.Bits() == p.ip.BitLen() }
netip.go#L1345: if c := cmp.Compare(p.Bits(), p2.Bits()); c != 0 {
netip.go#L1418: m, _ := p.ip.Prefix(p.Bits())
netip.go#L1445: return uint32((ip.addr.lo^p.ip.addr.lo)>>((32-p.Bits())&63)) == 0
netip.go#L1450: return ip.addr.xor(p.ip.addr).and(mask6(p.Bits())).isZero()
netip.go#L1470: if pb, ob := p.Bits(), o.Bits(); pb < ob {
netip.go#L1516: b = appendDecimal(b, uint8(p.Bits()))
netip.go#L1564: return append(b, uint8(p.Bits())), nil
netip.go#L1595: return p.ip.String() + "/" + strconv.Itoa(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()
The pages are generated with Golds v0.8.4. (GOOS=linux GOARCH=amd64)