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
use Params;
use Serialize;
/// Newtype for conversion array of pairs into [Params]
///
/// See also <https://stackoverflow.com/questions/63119000/why-am-i-required-to-cover-t-in-impl-foreigntraitlocaltype-for-t-e0210>
///
/// # Example
/// ```
/// use vk_method::{Params, PairsArray};
/// use ijson::ijson;
///
/// let array = [("user_id", 1)];
///
/// let params = Params::try_from(PairsArray(array)).unwrap();
///
/// assert_eq!(
/// params,
/// Params(vec![("user_id".to_string(), ijson!(1))])
/// );
///```
; N])
where
K: ToString,
V: Serialize;