- Method cast
mixed cast(string requested_type)
Value cast callback.
- Parameter requested_type
Type to cast to.
Expected to return the object value-casted (converted) to the type described by requested_type.
The argument is currently a string with the name of the type, but might in the future be a value of the type type.
Currently casting between object types is a noop.
If the returned value is not deemed to be of the requested type a runtime error may be thrown.
It's assumed that this function is side-effect free.