mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-23 03:38:35 +00:00
19 lines
395 B
Go
19 lines
395 B
Go
package payload
|
|
|
|
import "io"
|
|
|
|
// Nothing is a safe non payload.
|
|
var Nothing = nothing{}
|
|
|
|
// Payloader ..
|
|
type Payloader interface {
|
|
Encode(io.Writer) error
|
|
Decode(io.Reader) error
|
|
Size() uint32
|
|
}
|
|
|
|
type nothing struct{}
|
|
|
|
func (p nothing) Encode(w io.Writer) error { return nil }
|
|
func (p nothing) Decode(R io.Reader) error { return nil }
|
|
func (p nothing) Size() uint32 { return 0 }
|