All Downloads are FREE. Search and download functionalities are using the official Maven repository.

rust.reqwest.api_mod.mustache Maven / Gradle / Ivy

There is a newer version: 7.8.0
Show 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 {
        return Error::Reqwest(e)
    }
}

impl From for Error {
    fn from(e: serde_json::Error) -> Self {
        return Error::Serde(e)
    }
}

impl From for Error {
    fn from(e: std::io::Error) -> Self {
        return Error::Io(e)
    }
}

pub fn urlencode>(s: T) -> String {
    ::url::form_urlencoded::byte_serialize(s.as_ref().as_bytes()).collect()
}

use super::models::*;

{{#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 - 2024 Weber Informatics LLC | Privacy Policy