github.com/annchain/OG@v0.0.9/p2p/discover/node_gen.go (about)

     1  package discover
     2  
     3  // Code generated by github.com/tinylib/msgp DO NOT EDIT.
     4  
     5  import (
     6  	"github.com/tinylib/msgp/msgp"
     7  )
     8  
     9  // DecodeMsg implements msgp.Decodable
    10  func (z *EncPubkey) DecodeMsg(dc *msgp.Reader) (err error) {
    11  	err = dc.ReadExactBytes((z)[:])
    12  	if err != nil {
    13  		return
    14  	}
    15  	return
    16  }
    17  
    18  // EncodeMsg implements msgp.Encodable
    19  func (z *EncPubkey) EncodeMsg(en *msgp.Writer) (err error) {
    20  	err = en.WriteBytes((z)[:])
    21  	if err != nil {
    22  		return
    23  	}
    24  	return
    25  }
    26  
    27  // MarshalMsg implements msgp.Marshaler
    28  func (z *EncPubkey) MarshalMsg(b []byte) (o []byte, err error) {
    29  	o = msgp.Require(b, z.Msgsize())
    30  	o = msgp.AppendBytes(o, (z)[:])
    31  	return
    32  }
    33  
    34  // UnmarshalMsg implements msgp.Unmarshaler
    35  func (z *EncPubkey) UnmarshalMsg(bts []byte) (o []byte, err error) {
    36  	bts, err = msgp.ReadExactBytes(bts, (z)[:])
    37  	if err != nil {
    38  		return
    39  	}
    40  	o = bts
    41  	return
    42  }
    43  
    44  // Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
    45  func (z *EncPubkey) Msgsize() (s int) {
    46  	s = msgp.ArrayHeaderSize + (64 * (msgp.ByteSize))
    47  	return
    48  }