Example #1
0
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
}