bitflag

package
v1.20210103.1 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2021 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package bitflag contains utilities for working with bit flags (or bit masks).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bitflag

type Bitflag uint64

Bitflag is a large unsighted integer flag set.

func Combine

func Combine(values ...Bitflag) Bitflag

Combine combines all the values into one flag.

func (Bitflag) All

func (bf Bitflag) All(values Bitflag) bool

All returns if all of a given set of flags are set.

func (Bitflag) Any

func (bf Bitflag) Any(values Bitflag) bool

Any returns if any the reference bits are set for a given value

func (Bitflag) Set

func (bf Bitflag) Set(values Bitflag) Bitflag

Set sets a flag value to 1.

func (Bitflag) Unset

func (bf Bitflag) Unset(values Bitflag) Bitflag

Unset makes a given flag zero'd in the set.

Jump to

Keyboard shortcuts

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