encodeTo method

  1. @override
void encodeTo(
  1. PeerInfo<H, N> value,
  2. Output output
)
override

Convert self to a slice and append it to the destination.

Implementation

@override
void encodeTo(
  PeerInfo<H, N> value,
  Output output,
) {
  StrCodec.codec.encodeTo(
    value.peerId,
    output,
  );
  StrCodec.codec.encodeTo(
    value.roles,
    output,
  );
  hashCodec.encodeTo(
    value.bestHash,
    output,
  );
  numberCodec.encodeTo(
    value.bestNumber,
    output,
  );
}