neoneo-go/pkg/io/serializable.go
Roman Khimov 5bf00db2c9 io: move BinReader/BinWriter there, redo Serializable with it
The logic here is that we'll have all binary encoding/decoding done via our io
package, which simplifies error handling. This functionality doesn't belong to
util, so it's moved.

This also expands BufBinWriter with Reset() method to fit the needs of core
package.
2019-09-16 23:39:51 +03:00

8 lines
184 B
Go

package io
// Serializable defines the binary encoding/decoding interface.
type Serializable interface {
Size() int
DecodeBinary(*BinReader) error
EncodeBinary(*BinWriter) error
}