const mixinafBedSheet::ValueEncoders
afBedSheet::ValueEncoders
(Service) - Contribute your ValueEncoder
classes to this.
@uses a Configuration of Type:ValueEncoder
where Type
is what the ValueEncoder
, um, encodes!
- find
abstract ValueEncoder? find(Type valType)
Finds a
ValueEncoder
for the given type. Returnsnull
if none found.- toClient
abstract Str toClient(Type valType, Obj? value)
Converts the given
value
to Str via a contributed ValueEncoder. If noValueEncoder
is found,toStr()
is used.valType
is NOTStr#
!!! But rather the Type of the Obj that is being converted. Required to ensure the correctValueEncoder
is used, and to convertnull
to default instances.- toValue
abstract Obj? toValue(Type valType, Str clientValue)
Converts the given
clientValue
into the givenvalType
via a contributed ValueEncoder. If noValueEncoder
is found the value is coerced.