rust.reqwest.api_mod.mustache Maven / Gradle / Ivy
The newest version!
use reqwest;
use serde_json;
#[derive(Debug)]
pub enum Error {
Reqwest(reqwest::Error),
Serde(serde_json::Error),
Io(std::io::Error),
}
impl From for Error {
fn from(e: reqwest::Error) -> Self {
Error::Reqwest(e)
}
}
impl From for Error {
fn from(e: serde_json::Error) -> Self {
Error::Serde(e)
}
}
impl From for Error {
fn from(e: std::io::Error) -> Self {
Error::Io(e)
}
}
pub fn urlencode>(s: T) -> String {
::url::form_urlencoded::byte_serialize(s.as_ref().as_bytes()).collect()
}
{{#apiInfo}}
{{#apis}}
mod {{{classFilename}}};
{{#operations}}
{{#operation}}
{{#-last}}
pub use self::{{{classFilename}}}::{ {{{classname}}}, {{{classname}}}Client };
{{/-last}}
{{/operation}}
{{/operations}}
{{/apis}}
{{/apiInfo}}
pub mod configuration;
pub mod client;
© 2015 - 2025 Weber Informatics LLC | Privacy Policy