Lines Matching refs:Encoder
14 // An Encoder manages the transmission of type and data information to the
16 type Encoder struct {
32 // NewEncoder returns a new encoder that will transmit on the io.Writer.
33 func NewEncoder(w io.Writer) *Encoder {
34 enc := new(Encoder)
41 // writer() returns the innermost writer the encoder is using
42 func (enc *Encoder) writer() io.Writer {
46 // pushWriter adds a writer to the encoder.
47 func (enc *Encoder) pushWriter(w io.Writer) {
52 func (enc *Encoder) popWriter() {
56 func (enc *Encoder) setError(err error) {
63 func (enc *Encoder) writeMessage(w io.Writer, b *encBuffer) {
71 enc.setError(errors.New("gob: encoder: message too big"))
92 func (enc *Encoder) sendActualType(w io.Writer, state *encoderState, ut *userTypeInfo, actual reflect.Type) (sent bool) {
134 func (enc *Encoder) sendType(w io.Writer, state *encoderState, origt reflect.Type) (sent bool) {
173 func (enc *Encoder) Encode(e interface{}) error {
180 func (enc *Encoder) sendTypeDescriptor(w io.Writer, state *encoderState, ut *userTypeInfo) {
208 func (enc *Encoder) sendTypeId(state *encoderState, ut *userTypeInfo) {
215 func (enc *Encoder) EncodeValue(value reflect.Value) error {
223 // goroutines can share an encoder.