cmem

package
v0.0.0-...-72d0ae2 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2023 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Overview

Package cmem provides helper functionality for accessing memory in a C compatible fashion.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CMarshaler

type CMarshaler interface {
	MarshalC() ([]byte, error)
}

CMarshaler is an interface for types that can marshal their data into a C compatible binary layout.

type Encoder

type Encoder struct {
	// Buf contains the encoded data.
	Buf []byte
	// contains filtered or unexported fields
}

Encoder is a wrapper type for information necessary to create and subsequently write an in memory object to a PacketTable using Append().

func (*Encoder) Encode

func (enc *Encoder) Encode(data interface{}) error

Encode encodes the value passed as data to binary form stored in []Buf. This buffer is a Go representation of a C in-memory object that can be appended to e.g. a HDF5 PacketTable.

Struct values must only have exported fields, otherwise Encode will panic.

Jump to

Keyboard shortcuts

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