castFrom<SS, ST, TS, TT> static method Null safety

Converter<TS, TT> castFrom<SS, ST, TS, TT>(
  1. Converter<SS, ST> source
)
override

Adapts source to be a Converter<TS, TT>.

This allows source to be used at the new type, but at run-time it must satisfy the requirements of both the new type and its original type.

Conversion input must be both SS and TS and the output created by source for those input must be both ST and TT.

Implementation

static Converter<TS, TT> castFrom<SS, ST, TS, TT>(Converter<SS, ST> source) =>
    CastConverter<SS, ST, TS, TT>(source);