Documentation ¶
Index ¶
- type BitField
- func (bf BitField) All(val bool) bool
- func (bf BitField) Clear(idx uint32)
- func (bf BitField) CountSet() (ret uint32)
- func (bf *BitField) FromProperty(p datastore.Property) error
- func (bf BitField) IsSet(idx uint32) bool
- func (bf *BitField) MarshalBinary() ([]byte, error)
- func (bf *BitField) Reset()
- func (bf BitField) Set(idx uint32)
- func (bf BitField) Size() uint32
- func (bf *BitField) ToProperty() (datastore.Property, error)
- func (bf *BitField) UnmarshalBinary(bs []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BitField ¶
type BitField struct {
// contains filtered or unexported fields
}
BitField is a luci/gae-serializable bit field implementation. It should be nice and fast for non-AppEngine use as well.
You should construct a new one with bf.Make, rather than by direct construction.
func (BitField) Clear ¶
Clear turns the given bit to false, regardless of its previous value. Will panic if idx >= Size().
func (*BitField) FromProperty ¶
FromProperty implements datastore.PropertyConverter
func (*BitField) MarshalBinary ¶
MarshalBinary implements encoding.BinaryMarshaller
func (*BitField) Reset ¶
func (bf *BitField) Reset()
Reset resets this BitField to the 'empty' (size-0) state.
func (BitField) Set ¶
Set turns the given bit to true, regardless of its previous value. Will panic if idx >= Size().
func (*BitField) ToProperty ¶
ToProperty implements datastore.PropertyConverter
func (*BitField) UnmarshalBinary ¶
UnmarshalBinary implements encoding.BinaryUnmarshaler