MCPcopy Create free account
hub / github.com/ElementsProject/lightning / fmt

Method fmt

plugins/rest-plugin/src/structs.rs:57–68  ·  view source on GitHub ↗
(&self, f: &mut std::fmt::Formatter<'_>)

Source from the content-addressed store, hash-verified

55
56impl std::fmt::Display for AppError {
57 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
58 match self {
59 AppError::BadRequest(err) => write!(f, "Bad Request: {err}"),
60 AppError::Unauthorized(err) => write!(f, "Unauthorized: {err}"),
61 AppError::Forbidden(err) => write!(f, "Forbidden: {err}"),
62 AppError::NotFound(err) => write!(f, "Not Found: {err}"),
63 AppError::MethodNotAllowed(err) => write!(f, "Method not allowed: {err}"),
64 AppError::InternalServerError(err) => write!(f, "Internal Server Error: {err}"),
65 AppError::NotAcceptable(err) => write!(f, "Not Acceptable: {err}"),
66 AppError::PayloadTooLarge(err) => write!(f, "Payload Too Large: {err}"),
67 }
68 }
69}
70
71#[derive(Clone, Debug)]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected