Beispiel #1
0
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 *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
}
Beispiel #3
0
func (t *Int) Write(proto tl.Encoder) (err error) {
	err = proto.WriteInt(t.value)
	return
}