Interface Codec<T>
- Type Parameters:
T- the application type
- All Known Implementing Classes:
PText.TextCodec
public interface Codec<T>
Encodes a key or value to the canonical CBOR item a node embeds and decodes it
back (srad/agentspaces-pdt.md §3.1, §3.2). The default of
of(Class) is
CborCodec.toBytes and fromBytes with the class, so a key hashes
and compares by the same bytes every language produces.-
Method Summary
-
Method Details
-
encode
The canonical CBOR bytes of a value, exactly one data item. -
decode
The value of one CBOR data item. -
of
-