MCPcopy Create free account
hub / github.com/Rust-Web-Development/code / fmt

Method fmt

ch_07/handle-errors/src/lib.rs:17–23  ·  view source on GitHub ↗
(&self, f: &mut std::fmt::Formatter)

Source from the content-addressed store, hash-verified

15
16impl std::fmt::Display for Error {
17 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
18 match self {
19 Error::ParseError(err) => write!(f, "Cannot parse parameter: {}", err),
20 Error::MissingParameters => write!(f, "Missing parameter"),
21 Error::DatabaseQueryError => write!(f, "Cannot update, invalid data."),
22 }
23 }
24}
25
26impl Reject for Error {}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected