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
ValueEncoderfor the given type. Returnsnullif none found.- toClient
abstract Str toClient(Type valType, Obj? value)Converts the given
valueto Str via a contributed ValueEncoder. If noValueEncoderis found,toStr()is used.valTypeis NOTStr#!!! But rather the Type of the Obj that is being converted. Required to ensure the correctValueEncoderis used, and to convertnullto default instances.- toValue
abstract Obj? toValue(Type valType, Str clientValue)Converts the given
clientValueinto the givenvalTypevia a contributed ValueEncoder. If noValueEncoderis found the value is coerced.