In Str§
See primary documentation in context for method Version.
method Version(Str:D: --> Version:D)
Available as of the 2020.01 release of the Rakudo compiler.
Coerces the string to Version
.
This could be used for type coercion in signature, as for example:
sub f(Version(Str) $want-version) { say $want-version.^name }; f "1.2.3"; # OUTPUT: «Version»