[−][src]Trait new_home_application::method::response_formatter::ResponseFormatter
The Response formatter is meant to create a Value
(mainly) for the MethodResponse
struct
It collects all possible response data types
These types are meant for displaying by other applications
Required methods
fn clear(&mut self)
Clears the response buffer
fn get_value(&self) -> Value
Gets the response buffer as an serde_json::Value
fn add_error(&mut self, message: &String)
Adds an error formatted section to the internal buffer
fn add_info(&mut self, message: &String)
Adds an info formatted section to the internal buffer
fn add_debug(&mut self, message: &String)
Adds a debug formatted section to the internal buffer
fn add_success(&mut self, message: &String)
Adds a success formatted section to the internal buffer
fn add_markdown(&mut self, message: &String)
Adds a markdown formatted section to the internal buffer
fn add_list(&mut self, items: Vec<Value>)
Adds a list formatted section to the internal buffer
fn add_data(&mut self, items: Map<String, Value>)
Adds a data formatted section to the internal buffer