bits

package
v0.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 14, 2021 License: Apache-2.0 Imports: 0 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HasBit

func HasBit(v, b uint64) bool

HasBit - returns true if `v` has the bitmask `b`

Types

type BitFlags

type BitFlags interface {
	Get() CBitFlags
	Set(f CBitFlags) BitFlags
	Clear(f CBitFlags) BitFlags
	Toggle(f CBitFlags) BitFlags
	Has(f CBitFlags) bool
}

type CBitFlags

type CBitFlags uint64

func (CBitFlags) Clear

func (b CBitFlags) Clear(f CBitFlags) CBitFlags

func (CBitFlags) Has

func (b CBitFlags) Has(f CBitFlags) bool

func (CBitFlags) Set

func (b CBitFlags) Set(f CBitFlags) CBitFlags

func (CBitFlags) Toggle

func (b CBitFlags) Toggle(f CBitFlags) CBitFlags

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL