CombinedConvertorImpl.converts

Check whether convertor is able to convert from type to type.

Check whether convertor is able to convert from type to type. This set of methods should be the most precise way of determining whether convertor is able to convert from type to type, since it provides both components to the decision logic implemented by convertor compared to the case with convertsTo and convertsFrom. Note that those methods are still useful when categorization or other logic should be applied per original or destination type.

Implementation: This is default implementation of converts methods which delegate the decision to convertsTo and convertsFrom.

  1. bool converts(TypeInfo from, TypeInfo to)
    class CombinedConvertorImpl
    @safe const nothrow
    bool
    converts
    (
    const TypeInfo from
    ,
    const TypeInfo to
    )
  2. bool converts(TypeInfo from, Object to)
  3. bool converts(Object from, TypeInfo to)
  4. bool converts(Object from, Object to)

Parameters

from TypeInfo

the original component or it's type to convert from

to TypeInfo

the destination component or it's type to convert to

Return Value

Type: bool

true if it is able to convert from component to destination component

Meta