MCPcopy Create free account
hub / github.com/chridou/http-api-problem / display_message

Method display_message

src/api_error.rs:80–90  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

detail_messageMethod · 0.80

Tested by

no test coverage detected