From

protocol From<Source>

Constructs Self from a caller-supplied source value.

From is invoked explicitly as a static-style conversion owned by the target type. It is not the compiler's implicit adaptation hook; declare Into on the source type when values should cross typed boundaries automatically.

Methods

func from(value: Source) -> Self

Produces a target value from Source according to the conformer's contract.

View Source
func from(value: Source) -> Self