func decoderOfOptional(ctx *ctx, typ reflect2.Type) ValDecoder { … } func encoderOfOptional(ctx *ctx, typ reflect2.Type) ValEncoder { … } type OptionalDecoder … func (decoder *OptionalDecoder) Decode(ptr unsafe.Pointer, iter *Iterator) { … } type dereferenceDecoder … func (decoder *dereferenceDecoder) Decode(ptr unsafe.Pointer, iter *Iterator) { … } type OptionalEncoder … func (encoder *OptionalEncoder) Encode(ptr unsafe.Pointer, stream *Stream) { … } func (encoder *OptionalEncoder) IsEmpty(ptr unsafe.Pointer) bool { … } type dereferenceEncoder … func (encoder *dereferenceEncoder) Encode(ptr unsafe.Pointer, stream *Stream) { … } func (encoder *dereferenceEncoder) IsEmpty(ptr unsafe.Pointer) bool { … } func (encoder *dereferenceEncoder) IsEmbeddedPtrNil(ptr unsafe.Pointer) bool { … } type referenceEncoder … func (encoder *referenceEncoder) Encode(ptr unsafe.Pointer, stream *Stream) { … } func (encoder *referenceEncoder) IsEmpty(ptr unsafe.Pointer) bool { … } type referenceDecoder … func (decoder *referenceDecoder) Decode(ptr unsafe.Pointer, iter *Iterator) { … }