Function userstyles::get_style
[−]
[src]
pub fn get_style(id: u32) -> Result<Style, String>
Make a request to the API for a style.
id
is the identifier of the style you want to request.
Panics
Panics under the following conditions:
- Unable to create a request
- Response is not
200
- The response could not be parsed
Examples
use userstyles::get_style; // Style URL: "https://userstyles.org/styles/37035/github-dark" let response = get_style(37035); assert!(response.is_ok());