WebSocketMessage.as

T as(T)() if (!isArray!T) const

Return the payload as a specific type.

auto msg = WebSocketMessage("Hello world");
auto str = msg.as!string;

T as(T)() if (isArray!T) const

Ditto