encoder

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2024 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

type Provider struct {
	reflect.Type
	Int     []*xunsafe.Field
	Float64 []*xunsafe.Field
	String  []*xunsafe.Field
	Bool    []*xunsafe.Field
	TimePtr []*xunsafe.Field
	Float32 []*xunsafe.Field
	Time    []*xunsafe.Field
	Strings []*xunsafe.Field
	Ints    []*xunsafe.Field
	// contains filtered or unexported fields
}

Provider represents a struct encoder provider

func New

func New(value interface{}) (*Provider, error)

New creates struct encoder provider

func (*Provider) New

func (p *Provider) New(value interface{}) io.Encoder

New creates encoder for a struct value

type Struct

type Struct struct {
	*Provider
	// contains filtered or unexported fields
}

Struct reprsents basic struct encoder

func (*Struct) Encode

func (e *Struct) Encode(stream io.Stream)

Encode encodes a stream

Jump to

Keyboard shortcuts

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