(c: tonic::Code)
| 223 | } |
| 224 | |
| 225 | fn code_name(c: tonic::Code) -> &'static str { |
| 226 | match c { |
| 227 | tonic::Code::Ok => "OK", |
| 228 | tonic::Code::Cancelled => "Cancelled", |
| 229 | tonic::Code::Unknown => "Unknown", |
| 230 | tonic::Code::InvalidArgument => "InvalidArgument", |
| 231 | tonic::Code::DeadlineExceeded => "DeadlineExceeded", |
| 232 | tonic::Code::NotFound => "NotFound", |
| 233 | tonic::Code::AlreadyExists => "AlreadyExists", |
| 234 | tonic::Code::PermissionDenied => "PermissionDenied", |
| 235 | tonic::Code::ResourceExhausted => "ResourceExhausted", |
| 236 | tonic::Code::FailedPrecondition => "FailedPrecondition", |
| 237 | tonic::Code::Aborted => "Aborted", |
| 238 | tonic::Code::OutOfRange => "OutOfRange", |
| 239 | tonic::Code::Unimplemented => "Unimplemented", |
| 240 | tonic::Code::Internal => "Internal", |
| 241 | tonic::Code::Unavailable => "Unavailable", |
| 242 | tonic::Code::DataLoss => "DataLoss", |
| 243 | tonic::Code::Unauthenticated => "Unauthenticated", |
| 244 | } |
| 245 | } |
| 246 | |
| 247 | #[cfg(test)] |
| 248 | mod tests { |
nothing calls this directly
no outgoing calls
no test coverage detected