Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrCannotPickle = errors.New("cannot pickle")
A Pickler can return ErrCannotPickle to indicate that it does not support pickling a particular value.
Functions ¶
This section is empty.
Types ¶
type Decoder ¶
type Decoder struct {
// contains filtered or unexported fields
}
A Decoder decodes pickled values from an underlying Reader.
func NewDecoder ¶
NewDecoder creates a new Decoder that reads from the given reader and unpickles non-primitive values using the given Unpickler.
type Encoder ¶
type Encoder struct {
// contains filtered or unexported fields
}
An Encoder encodes values to an underlying Writer.
func NewEncoder ¶
NewEncoder creates a new Encoder that writes to the given reader and pickles non-primitive values using the given Pickler.
type Pickler ¶
type Pickler interface { // Pickle is called to pickle a non-primitive value. Pickle(x starlark.Value) (module, name string, args starlark.Tuple, err error) }
Pickler may be implemented to provide support for pickling non-primitive values.
type PicklerFunc ¶
A PicklerFunc is an implementation of Pickler that implements Pickle by calling itself.
type Unpickler ¶
type Unpickler interface { // Unpickle is called to unpickle a non-primitive value. Unpickle(module, name string, args starlark.Tuple) (starlark.Value, error) }
Unpickler may be implemented to provide support for unpickling non-primitive values.
type UnpicklerFunc ¶
An UnpicklerFunc is an implementation of Unpickler that implements Unpickle by calling itself.