ops

org.sigilaris.core.codec.byte.ByteDecoder.ops
object ops

Extension methods for decoding bytes to values.

Attributes

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

Members list

Extensions

Extensions

extension (bytes: ByteVector)
def to[A : ByteDecoder]: Either[DecodeFailure, A]

Decodes bytes to a value, failing if remainder is non-empty.

Decodes bytes to a value, failing if remainder is non-empty.

Attributes

Returns

Either failure or fully decoded value

Example
 import ByteDecoder.ops.*
 val result: Either[DecodeFailure, Long] = bytes.to[Long]
Source
ByteDecoder.scala