bitflag

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2022 License: GPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const WildcardContainer = Container(^uint(0))

WildcardContainer provides a bitflag container with all flags set

Variables

This section is empty.

Functions

This section is empty.

Types

type Container

type Container uint

Container represents a bitflag container and provides methods to simplify working with them

const EmptyContainer Container = 0

EmptyContainer provides an empty bitflag container

func (Container) Has

func (cur Container) Has(flags ...Flag) bool

Has checks if the container has all the given flags set

func (Container) With

func (cur Container) With(flags ...Flag) Container

With returns a new container with the given flags and the current ones set

func (Container) Without

func (cur Container) Without(flags ...Flag) Container

Without returns a new container with the current flags but without the given ones set

type Flag

type Flag uint

Flag represents a single bitflag

Jump to

Keyboard shortcuts

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