pub trait Report: Serialize + ToString {
// Provided methods
fn text(&self) -> Result<String, ReportError> { ... }
fn json(&self) -> String { ... }
fn report(&self, format: ReportFormat) -> Result<String, ReportError> { ... }
}
Expand description
This trait should be implemented by all api responses, so that the response can be formatted for users.
Provided Methods§
fn text(&self) -> Result<String, ReportError>
fn json(&self) -> String
fn report(&self, format: ReportFormat) -> Result<String, ReportError>
Object Safety§
This trait is not object safe.