github.com/tunabay/go-bitarray@v1.3.1/bitarrayer.go (about) 1 // Copyright (c) 2021 Hirotsuna Mizuno. All rights reserved. 2 // Use of this source code is governed by the MIT license that can be found in 3 // the LICENSE file. 4 5 package bitarray 6 7 // BitArrayer is an interface implemented by any type that can be treated as a 8 // BitArray. Within this package, BitArray itself, Builder and Buffer implement 9 // this interface. 10 // 11 // BitArray returns the value of itself converted to a BitArray. Note that for 12 // non-immutable types, multiple calls may return different values. It is legal 13 // to return nil to represent an empty BitArray, and it should be treated the 14 // same as a zero-length BitArray. 15 type BitArrayer interface { 16 BitArray() *BitArray 17 }