(&self)
| 78 | } |
| 79 | |
| 80 | pub fn display_message(&self) -> Cow<str> { |
| 81 | if let Some(message) = self.detail_message() { |
| 82 | return message; |
| 83 | } |
| 84 | |
| 85 | if let Some(canonical_reason) = self.status.canonical_reason() { |
| 86 | return Cow::Borrowed(canonical_reason); |
| 87 | } |
| 88 | |
| 89 | Cow::Borrowed(self.status.as_str()) |
| 90 | } |
| 91 | |
| 92 | /// Adds a serializable field. If the serialization fails nothing will be |
| 93 | /// added. This method returns `true` if the field was added and `false` if |
nothing calls this directly
no test coverage detected