20enum class MethodType :
unsigned char {
22 kServerStreaming = 0b01,
23 kClientStreaming = 0b10,
24 kBidirectionalStreaming = 0b11,
28constexpr bool HasServerStream(MethodType type) {
29 return (
static_cast<unsigned>(type) &
30 static_cast<unsigned>(MethodType::kServerStreaming)) != 0;
34constexpr bool HasClientStream(MethodType type) {
35 return (
static_cast<unsigned>(type) &
36 static_cast<unsigned>(MethodType::kClientStreaming)) != 0;