MCPcopy
hub / github.com/etcd-io/bbolt / LeafPageElements

Method LeafPageElements

internal/common/page.go:107–114  ·  view source on GitHub ↗

LeafPageElements retrieves a list of leaf nodes.

()

Source from the content-addressed store, hash-verified

105
106// LeafPageElements retrieves a list of leaf nodes.
107func (p *Page) LeafPageElements() []leafPageElement {
108 if p.count == 0 {
109 return nil
110 }
111 data := UnsafeAdd(unsafe.Pointer(p), unsafe.Sizeof(*p))
112 elems := unsafe.Slice((*leafPageElement)(data), int(p.count))
113 return elems
114}
115
116// BranchPageElement retrieves the branch node by index
117func (p *Page) BranchPageElement(index uint16) *branchPageElement {

Callers 4

TestNode_read_LeafPageFunction · 0.80
nsearchMethod · 0.80

Calls 1

UnsafeAddFunction · 0.85

Tested by 1

TestNode_read_LeafPageFunction · 0.64