[−][src]Function rusp::usp_generator::usp_get_response
pub fn usp_get_response<'a>(
result: Vec<(&'a str, Result<Vec<(&'a str, Vec<(&'a str, &'a str)>)>, (u32, &'a str)>)>
) -> Body<'a>
Creates a body for a USP Msg with a USP GetResp response
Arguments
result
- A vector of Result tuples to put into the GetResp response
Example
use rusp::usp_generator::usp_get_response; let resp = usp_get_response(vec![ ("Device.", Ok(vec![("Device.", vec![("Foo", "Bar")])])), ("Dev.", Err((7000, "Message failed"))), ]);