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
65
66
67
68
69
70
71
72
73
74
75
use crate::*;
// TODO: define IntoParam<T> trait rather than Into<Param<T>> so that other modules can define specializations
// TODO: that way, types that must be specialized don't have to live in the Windows crate and have their own ElementType
// A WinRT method parameter used to accept either a reference or value. `Param` is used by the
// generated bindings and should not generally be used directly.
// impl<'a, T: Abi> From<T> for Param<'a, T> {
// fn from(value: T) -> Self {
// Param::Owned(value)
// }
// }
// impl<'a, T: Abi> From<&'a T> for Param<'a, T> {
// fn from(value: &'a T) -> Self {
// Param::Borrowed(value)
// }
// }
// impl<'a, T: Interface> From<Option<T>> for Param<'a, T> {
// fn from(value: Option<T>) -> Self {
// match value {
// Some(value) => Param::Owned(value),
// None => Param::None,
// }
// }
// }
// impl<'a, T: Interface> From<&'a Option<T>> for Param<'a, T> {
// fn from(value: &'a Option<T>) -> Self {
// match value {
// Some(value) => Param::Borrowed(value),
// None => Param::None,
// }
// }
// }
// impl<'a> From<&'a str> for Param<'a, HString> {
// fn from(value: &'a str) -> Self {
// Param::Owned(value.into())
// }
// }
// impl<'a> From<String> for Param<'a, HString> {
// fn from(value: String) -> Self {
// Param::Owned(value.into())
// }
// }