#![deny(clippy::all, clippy::cargo)]
#![cfg_attr(feature_never_type, feature(never_type))]
#![cfg_attr(feature_matches_macro, feature(matches_macro))]
#![cfg_attr(feature_inner_deref, feature(inner_deref))]
#![cfg_attr(feature_test, feature(test))]
#![cfg_attr(feature_transparent_enums, feature(transparent_enums))]
#![no_std]
extern crate no_std_compat as std;
use std::prelude::v1::*;
#[cfg(all(test, feature_test))]
extern crate test;
#[macro_use]
pub(crate) mod util;
pub mod api_call;
pub mod application;
pub mod credentials;
pub mod encoding;
pub mod extensions;
pub mod http;
pub mod service;
pub mod transaction;
pub mod usage;
pub mod user;
pub mod version;
#[cfg(feature = "xml-response")]
pub mod response;
pub(crate) mod error {
pub use anyhow::{anyhow, Error, Result};
}
pub use error::Error;
#[allow(unused_imports)]
pub(crate) use error::anyhow;
use std::borrow::Cow;
pub(crate) trait ToParams<'k, 'v, 'this, E>
where
'this: 'k + 'v,
E: Extend<(Cow<'k, str>, &'v str)>,
{
fn to_params(&'this self, extendable: &mut E) {
self.to_params_with_prefix(extendable, None);
}
fn to_params_with_prefix(&'this self, extendable: &mut E, prefix: Option<&'k str>) {
self.to_params_with_mangling(extendable, &mut |c| match prefix {
Some(p) => c + p,
_ => c,
});
}
fn to_params_with_mangling<F: FnMut(Cow<'k, str>) -> Cow<'k, str>>(
&'this self,
extendable: &mut E,
key_mangling: &mut F,
);
}
#[cfg(test)]
mod tests {
#[test]
fn it_works() {}
}