Documentation
¶
Index ¶
Constants ¶
View Source
const (
Boundary = "---"
)
Variables ¶
View Source
var BoundaryStringValue catgut.String
Functions ¶
func ReadBoundary ¶
func ReadBoundary(r *catgut.RingBuffer) (n int, err error)
Types ¶
type Coder ¶
type Coder[O any] struct { RequireMetadata bool Metadata, Blob interfaces.Coder[O] }
func (*Coder[O]) DecodeFrom ¶
type CoderTypeMap ¶
type CoderTypeMap[S any] map[string]interfaces.Coder[*TypedStruct[S]]
func (CoderTypeMap[S]) DecodeFrom ¶
func (c CoderTypeMap[S]) DecodeFrom( subject *TypedStruct[S], reader io.Reader, ) (n int64, err error)
func (CoderTypeMap[S]) EncodeTo ¶
func (c CoderTypeMap[S]) EncodeTo( subject *TypedStruct[S], writer io.Writer, ) (n int64, err error)
type CoderTypeMapWithoutType ¶
type CoderTypeMapWithoutType[S any] map[string]interfaces.Coder[S]
func (CoderTypeMapWithoutType[S]) DecodeFrom ¶
func (c CoderTypeMapWithoutType[S]) DecodeFrom( subject *TypedStruct[S], reader io.Reader, ) (n int64, err error)
func (CoderTypeMapWithoutType[S]) EncodeTo ¶
func (c CoderTypeMapWithoutType[S]) EncodeTo( subject *TypedStruct[S], writer io.Writer, ) (n int64, err error)
type Decoder ¶
type Decoder[O any] struct { RequireMetadata bool Metadata, Blob interfaces.DecoderFrom[O] }
type DecoderTypeMapWithoutType ¶
type DecoderTypeMapWithoutType[S any] map[string]interfaces.DecoderFrom[S]
func (DecoderTypeMapWithoutType[S]) DecodeFrom ¶
func (c DecoderTypeMapWithoutType[S]) DecodeFrom( subject *TypedStruct[S], reader io.Reader, ) (n int64, err error)
type MetadataWriterTo ¶
type Reader ¶
type Reader struct {
RequireMetadata bool // TODO-P4 add delimiter
Metadata, Blob io.ReaderFrom
}
type TypedMetadataCoder ¶
type TypedMetadataCoder[O any] struct{}
func (TypedMetadataCoder[O]) DecodeFrom ¶
func (TypedMetadataCoder[O]) DecodeFrom( subject *TypedStruct[O], reader io.Reader, ) (n int64, err error)
func (TypedMetadataCoder[O]) EncodeTo ¶
func (TypedMetadataCoder[O]) EncodeTo( subject *TypedStruct[O], writer io.Writer, ) (n int64, err error)
type TypedStruct ¶
func (*TypedStruct[S]) GetType ¶
func (typedStruct *TypedStruct[S]) GetType() *ids.Type
Click to show internal directories.
Click to hide internal directories.