bcts

package
v0.7.7 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadBytes

func ReadBytes[T ~[]byte](r io.Reader, b *T) error

func ReadInt16

func ReadInt16[T ~int16](r io.Reader, i *T) error

func ReadInt32

func ReadInt32[T ~int32](r io.Reader, i *T) error

func ReadInt64

func ReadInt64[T ~int64](r io.Reader, i *T) error

func ReadInt8

func ReadInt8[T ~int8](r io.Reader, i *T) error

func ReadMap

func ReadMap[KT comparable, K ComparableReader[KT], VT any, V Reader[VT]](
	r io.Reader,
	mp *map[KT]VT,
) error

func ReadSlice added in v0.7.7

func ReadSlice[TV any, T Reader[TV]](r io.Reader, s *[]T) error

func ReadSmallBytes

func ReadSmallBytes[T ~[]byte](r io.Reader, b *T) error

func ReadSmallString

func ReadSmallString[T ~string](r io.Reader, s *T) error

func ReadStaticBytes

func ReadStaticBytes[T ~[]byte](r io.Reader, b T) error

func ReadString

func ReadString[T ~string](r io.Reader, s *T) error

func ReadTime

func ReadTime(r io.Reader, t *time.Time) error

func ReadTinyBytes

func ReadTinyBytes[T ~[]byte](r io.Reader, b *T) error

func ReadTinyString

func ReadTinyString[T ~string](r io.Reader, s *T) error

func ReadUInt16

func ReadUInt16[T ~uint16](r io.Reader, i *T) error

func ReadUInt32

func ReadUInt32[T ~uint32](r io.Reader, i *T) error

func ReadUInt64

func ReadUInt64[T ~uint64](r io.Reader, i *T) error

func ReadUInt8

func ReadUInt8[T ~uint8](r io.Reader, i *T) error

func WriteBytes

func WriteBytes(w io.Writer, b []byte) error

func WriteInt16

func WriteInt16[T ~int16](w io.Writer, i T) error

func WriteInt32

func WriteInt32[T ~int32](w io.Writer, i T) error

func WriteInt64

func WriteInt64[T ~int64](w io.Writer, i T) error

func WriteInt8

func WriteInt8[T ~int8](w io.Writer, i T) error

func WriteMap

func WriteMap[K ComparableWriter, T Writer](w io.Writer, m map[K]T) error

func WriteSlice added in v0.7.7

func WriteSlice[T Writer, TI ~[]T](w io.Writer, s TI) error

func WriteSmallBytes

func WriteSmallBytes(w io.Writer, b []byte) error

func WriteSmallString

func WriteSmallString[T ~string](w io.Writer, s T) error

func WriteStaticBytes

func WriteStaticBytes(w io.Writer, b []byte) error

func WriteString

func WriteString[T ~string](w io.Writer, s T) error

func WriteTime

func WriteTime(w io.Writer, t time.Time) error

func WriteTinyBytes

func WriteTinyBytes(w io.Writer, b []byte) error

func WriteTinyString

func WriteTinyString[T ~string](w io.Writer, s T) error

func WriteUInt16

func WriteUInt16[T ~uint16](w io.Writer, i T) error

func WriteUInt32

func WriteUInt32[T ~uint32](w io.Writer, i T) error

func WriteUInt64

func WriteUInt64[T ~uint64](w io.Writer, i T) error

func WriteUInt8

func WriteUInt8[T ~uint8](w io.Writer, i T) error

Types

type Bytes

type Bytes []byte

func (Bytes) Bytes added in v0.7.7

func (b Bytes) Bytes() []byte

func (*Bytes) ReadBytes

func (b *Bytes) ReadBytes(r io.Reader) error

func (Bytes) WriteBytes

func (b Bytes) WriteBytes(w io.Writer) error

type ComparableReadWriter added in v0.7.7

type ComparableReadWriter[T any] interface {
	ComparableReader[T]
	ComparableWriter
}

type ComparableReader

type ComparableReader[T any] interface {
	comparable
	Reader[T]
}

type ComparableWriter

type ComparableWriter interface {
	comparable
	Writer
}

type ReadWriter

type ReadWriter[T any] interface {
	Reader[T]
	Writer
}

type Reader

type Reader[T any] interface {
	ReadBytes(io.Reader) error
	*T
}

type SmallBytes

type SmallBytes []byte

func (SmallBytes) Bytes added in v0.7.7

func (b SmallBytes) Bytes() []byte

func (*SmallBytes) ReadBytes

func (b *SmallBytes) ReadBytes(r io.Reader) error

func (SmallBytes) WriteBytes

func (b SmallBytes) WriteBytes(w io.Writer) error

type SmallString

type SmallString string

func (*SmallString) ReadBytes

func (s *SmallString) ReadBytes(r io.Reader) error

func (SmallString) WriteBytes

func (s SmallString) WriteBytes(w io.Writer) error

type String

type String string

func (*String) ReadBytes

func (s *String) ReadBytes(r io.Reader) error

func (String) WriteBytes

func (s String) WriteBytes(w io.Writer) error

type Time added in v0.7.7

type Time time.Time

func (*Time) ReadBytes added in v0.7.7

func (t *Time) ReadBytes(r io.Reader) error

func (Time) Time added in v0.7.7

func (t Time) Time() time.Time

func (Time) WriteBytes added in v0.7.7

func (t Time) WriteBytes(w io.Writer) error

type TinyBytes

type TinyBytes []byte

func (TinyBytes) Bytes added in v0.7.7

func (b TinyBytes) Bytes() []byte

func (*TinyBytes) ReadBytes

func (b *TinyBytes) ReadBytes(r io.Reader) error

func (TinyBytes) WriteBytes

func (b TinyBytes) WriteBytes(w io.Writer) error

type TinyString

type TinyString string

func (*TinyString) ReadBytes

func (s *TinyString) ReadBytes(r io.Reader) error

func (TinyString) WriteBytes

func (s TinyString) WriteBytes(w io.Writer) error

type Writer

type Writer interface {
	WriteBytes(io.Writer) error
}

Jump to

Keyboard shortcuts

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