1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#![warn(clippy::all)]
#![cfg_attr(feature = "nightly",
feature(never_type),
feature(const_saturating_int_methods))]
#![cfg_attr(all(test, feature = "nightly"), feature(test))]
#[cfg(all(test, feature = "nightly"))]
extern crate test;
#[cfg(feature = "nightly")]
pub type Never = !;
#[cfg(not(feature = "nightly"))]
pub type Never = core::convert::Infallible;
pub mod api_call;
pub mod application;
pub mod credentials;
pub mod encoding;
pub mod errors;
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 mod timestamp;
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() {}
}