Marshal serializes a type into a byte representation using gogo protobuf serialization rules. It returns the resulting bytes as a slice. The bytes are serialized in a format that is backwards-compatible with the previous version of CRDB so that clusters can run in mixed version mode during upgrade.
()
| 1775 | // bytes, err := protoutil.Marshal(&typ) |
| 1776 | // |
| 1777 | func (t *T) Marshal() (data []byte, err error) { |
| 1778 | // First downgrade to a struct that will be serialized in a backwards- |
| 1779 | // compatible bytes format. |
| 1780 | temp := *t |
| 1781 | if err := temp.downgradeType(); err != nil { |
| 1782 | return nil, err |
| 1783 | } |
| 1784 | return protoutil.Marshal(&temp.InternalType) |
| 1785 | } |
| 1786 | |
| 1787 | // MarshalTo behaves like Marshal, except that it deserializes to an existing |
| 1788 | // byte slice and returns the number of bytes written to it. The slice must |
nothing calls this directly
no test coverage detected