Record2Codec<A, B> class final

A 2-field record codec (see Codec.record2); const so it works as an enum-constant id, e.g. Record2Codec(Codec.string, Codec.integer).

Implemented types

Constructors

Record2Codec(Codec<A> a, Codec<B> b, [String sep = '~'])
const

Properties

a → Codec<A>
final
b → Codec<B>
final
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sep → String
final

Methods

decode(String token) → (A, B)?
Decode one already-percent-decoded token, or null if it isn't valid for T.
override
encode((A, B) value) → String
Encode a value back to its token. Inverse of decode on valid values.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited