given_ByteEncoder_BlockHeader

org.sigilaris.node.jvm.runtime.block.BlockHeader.given_ByteEncoder_BlockHeader

Attributes

Source
Model.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

override def encode(header: BlockHeader): ByteVector

Encodes a value to a deterministic byte sequence.

Encodes a value to a deterministic byte sequence.

Value parameters

value

the value to encode

Attributes

Returns

the encoded byte sequence

Definition Classes
Source
Model.scala

Inherited methods

def contramap[B](f: B => BlockHeader): ByteEncoder[B]

Creates a new encoder by applying a function before encoding.

Creates a new encoder by applying a function before encoding.

This is the contravariant map operation for encoders.

Value parameters

f

function to transform input before encoding

Attributes

Returns

new encoder for type B

Example
 case class UserId(value: Long)
 given ByteEncoder[UserId] = ByteEncoder[Long].contramap(_.value)
Inherited from:
ByteEncoder
Source
ByteEncoder.scala