Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type List ¶
type List[V any] struct { // contains filtered or unexported fields }
type ListBuilder ¶
type ListBuilder[V any] struct { // contains filtered or unexported fields }
func NewBuilder ¶
func NewBuilder[V any](initCap int) *ListBuilder[V]
func (*ListBuilder[V]) Add ¶
func (b *ListBuilder[V]) Add(start, end netip.Addr, v V) (ok bool)
Add returns false if addrs are invalid. Or their range is invalid (start < end).
func (*ListBuilder[V]) Build ¶
func (b *ListBuilder[V]) Build() (*List[V], error)
Build the list. If no error, the returned List will take the ownership of the builder memory. So, Build should only be called once.
Click to show internal directories.
Click to hide internal directories.