func (t *RpcError) Write(proto tl.Encoder) (err error) { err = proto.WriteInt(t.ErrorCode) if err != nil { return } err = proto.WriteString(t.ErrorMessage) return }
func (t *RpcResult) Write(encoder tl.Encoder) (err error) { if err = encoder.WriteLong(t.ReqMsgId); err != nil { return } if t.RpcError != nil { err = (t.RpcError.(*RpcError)).Box().Write(encoder) } else { err = t.Result.Write(encoder) } return }
func (b *ObjectBox) Write(proto tl.Encoder) (err error) { bare, err := b.Bare() if err != nil { return } err = proto.WriteTypeBegin(bare.GetID()) if err != nil { return } err = bare.Write(proto) return }
func (t *MockRPCResult) Write(proto tl.Encoder) (err error) { val0 := t.Arg if err = proto.WriteTypeBegin(builtin.TL_ID_VECTOR_T); err != nil { return err } if err = proto.WriteInt(int32(len(val0))); err != nil { return err } for _, val1 := range val0 { if err = proto.WriteInt(val1); err != nil { return err } } if err = proto.WriteTypeEnd(); err != nil { return err } return }
func (t *Double) Write(proto tl.Encoder) (err error) { err = proto.WriteDouble(t.value) return }
func (t *Bytes) Write(proto tl.Encoder) (err error) { err = proto.WriteBytes(t.value) return }
func (t *String) Write(proto tl.Encoder) (err error) { err = proto.WriteString(t.value) return }
func (t *Int) Write(proto tl.Encoder) (err error) { err = proto.WriteInt(t.value) return }