Function GenericPath.Segment.opCast
Converts the segment to another path type.
{null} opCast(T, F)();
The segment name will be re-validated during the conversion. The separator, if any, will be adopted or replaced by the default separator of the target path type.
Throws
A PathValidationException
is thrown if the segment name cannot
be represented in the target path format.