sizer

package
v1.1.22 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 11, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const Len = 4

Variables

This section is empty.

Functions

func Make

func Make[V uint32 | int](c V) (v []byte)

Types

type T

type T struct {
	Val uint32
}

func New

func New[V uint32 | int](c V) (p *T)

New creates a new value with the underlying type uint32, that can be written to and read from a binary byte buffer.

The reason why it is coded as generic with only one listed type is because it makes it possible to later on add another type, which is just a wrapper around uint32, that enables the use of other methods on it. This is because it became clear this was needed for the kinder.T type as well

func (*T) Len

func (c *T) Len() int

func (*T) Read

func (c *T) Read(buf *bytes.Buffer) (el keys.Element)

func (*T) Write

func (c *T) Write(buf *bytes.Buffer)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL