hashable

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 19, 2025 License: AGPL-3.0 Imports: 2 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MessageMaxSize

func MessageMaxSize() (s int)

MaxSize returns a maximum valid message size for this message type

Types

type Message

type Message struct {
	Message string `codec:"msg"`
	// contains filtered or unexported fields
}

Message is used for messages with no special meaning

func (*Message) CanMarshalMsg

func (_ *Message) CanMarshalMsg(z interface{}) bool

func (*Message) CanUnmarshalMsg

func (_ *Message) CanUnmarshalMsg(z interface{}) bool

func (*Message) MarshalMsg

func (z *Message) MarshalMsg(b []byte) (o []byte)

MarshalMsg implements msgp.Marshaler

func (*Message) MsgIsZero

func (z *Message) MsgIsZero() bool

MsgIsZero returns whether this is a zero value

func (*Message) Msgsize

func (z *Message) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (Message) ToBeHashed

func (msg Message) ToBeHashed() (protocol.HashID, []byte)

ToBeHashed implements the crypto.Hashable interface

func (*Message) UnmarshalMsg

func (z *Message) UnmarshalMsg(bts []byte) (o []byte, err error)

func (*Message) UnmarshalMsgWithState

func (z *Message) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL