singlesetmap

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: ISC Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Map

type Map[K comparable] struct {
	// contains filtered or unexported fields
}

Map is a (bit)map with entries that can only be set once. The Set() operation returns whether the entry was previously set.

func (*Map[K]) Set

func (m *Map[K]) Set(k K) (wasSet bool)

Set marks the passed entry key as set. Returns true if the entry was previously set, false if this operation actually set the entry to true.

Jump to

Keyboard shortcuts

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