MCPcopy
hub / github.com/rclone/rclone / Array

Method Array

fs/hash/hash.go:358–369  ·  view source on GitHub ↗

Array returns an array of all hash types in the set

()

Source from the content-addressed store, hash-verified

356
357// Array returns an array of all hash types in the set
358func (h Set) Array() (ht []Type) {
359 v := int(h)
360 i := uint(0)
361 for v != 0 {
362 if v&1 != 0 {
363 ht = append(ht, Type(1<<i))
364 }
365 i++
366 v >>= 1
367 }
368 return ht
369}
370
371// Count returns the number of hash types in the set
372func (h Set) Count() int {

Callers 13

TestHashSetFunction · 0.95
StringMethod · 0.95
dumpLineMethod · 0.80
PutMethod · 0.80
NewFsFunction · 0.80
HashesMethod · 0.80
checkStreamingMethod · 0.80
newReplacerMethod · 0.80
CheckHashesMethod · 0.80
fromTypesFunction · 0.80
newListJSONFunction · 0.80
GetFsInfoFunction · 0.80

Calls 1

TypeTypeAlias · 0.70

Tested by 2

TestHashSetFunction · 0.76
newReplacerMethod · 0.64