2018-01-28 15:06:41 +00:00
|
|
|
package payload
|
|
|
|
|
2020-03-03 14:21:42 +00:00
|
|
|
import "github.com/nspcc-dev/neo-go/pkg/io"
|
2018-01-28 15:06:41 +00:00
|
|
|
|
|
|
|
// Payload is anything that can be binary encoded/decoded.
|
|
|
|
type Payload interface {
|
2019-09-16 13:11:01 +00:00
|
|
|
io.Serializable
|
2018-01-28 15:06:41 +00:00
|
|
|
}
|
2019-09-13 09:03:07 +00:00
|
|
|
|
|
|
|
// NullPayload is a dummy payload with no fields.
|
|
|
|
type NullPayload struct {
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewNullPayload returns zero-sized stub payload.
|
2020-06-19 08:19:57 +00:00
|
|
|
func NewNullPayload() NullPayload {
|
|
|
|
return NullPayload{}
|
2019-09-13 09:03:07 +00:00
|
|
|
}
|
|
|
|
|
2019-09-16 16:31:49 +00:00
|
|
|
// DecodeBinary implements Serializable interface.
|
2020-06-19 08:19:57 +00:00
|
|
|
func (p NullPayload) DecodeBinary(r *io.BinReader) {}
|
2019-09-13 09:03:07 +00:00
|
|
|
|
2019-09-16 16:31:49 +00:00
|
|
|
// EncodeBinary implements Serializable interface.
|
2020-06-19 08:19:57 +00:00
|
|
|
func (p NullPayload) EncodeBinary(w *io.BinWriter) {}
|