decodeBytes<A> static method

Either<Error, A> decodeBytes<A>(
  1. Uint8List input,
  2. Decoder<A> decoder
)

Implementation

static Either<Error, A> decodeBytes<A>(Uint8List input, Decoder<A> decoder) =>
    parseBytes(input)
        .leftMap<Error>(identity)
        .flatMap((a) => decoder.decode(a));