The implementation is as straightforward as overloading the operator to accept the enum:
CSHARP
extension(string){ public static string operator |(string value, FormatAs format) { return format switch { FormatAs.MD5 => ..., FormatAs.Sha256 => ..., FormatAs.Base64 => ..., _ => throw new ArgumentOutOfRangeException() }; }}
I'm not saying this is the best use case for the feature, but I think it's a good example of how extension operators can make APIs more expressive over existing types, without introducing wrappers or long chains of extension methods.