A
- The type this operator transforms.public static interface Codec.ResultFunction<A>
Codec
. This can be used
to directly transform the DataResult
returned from the decoding and encoding methods.Modifier and Type | Method and Description |
---|---|
<T> DataResult<(A,T)> |
apply(DynamicOps<T> ops,
T input,
DataResult<(A,T)> a)
Applies a transformation to the result of decoding an object
a . |
<T> DataResult<T> |
coApply(DynamicOps<T> ops,
A input,
DataResult<T> t)
Applies a transformation to the result of encoding an object.
|
<T> DataResult<(A,T)> apply(DynamicOps<T> ops, T input, DataResult<(A,T)> a)
a
. This transformation may read
more input from the serialized form, or transform successes into errors and visa-versa.T
- The type of the serialized form.ops
- The DynamicOps
instance defining the serialized form.input
- The original input to Decoder.decode(Dynamic)
.a
- The result obtained from Decoder.decode(Dynamic)
.DataResult
.<T> DataResult<T> coApply(DynamicOps<T> ops, A input, DataResult<T> t)
T
- The type of the serialized form.ops
- The DynamicOps
instance defining the serialized form.input
- The original input to Encoder.encode(Object, DynamicOps, Object)
.t
- the result obtained from Encoder.encode(Object, DynamicOps, Object)
.DataResult
.