1 #![allow(unused_variables, non_upper_case_globals, non_snake_case, unused_unsafe, non_camel_case_types, dead_code, clippy::all)] 2 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: marker :: Copy, :: std :: clone :: Clone, :: std :: default :: Default, :: std :: fmt :: Debug)] 3 #[repr(transparent)] 4 pub struct CollectionChange(pub i32); 5 impl CollectionChange { 6 pub const Reset: CollectionChange = CollectionChange(0i32); 7 pub const ItemInserted: CollectionChange = CollectionChange(1i32); 8 pub const ItemRemoved: CollectionChange = CollectionChange(2i32); 9 pub const ItemChanged: CollectionChange = CollectionChange(3i32); 10 } 11 impl ::std::convert::From<i32> for CollectionChange { from(value: i32) -> Self12 fn from(value: i32) -> Self { 13 Self(value) 14 } 15 } 16 unsafe impl ::windows::runtime::Abi for CollectionChange { 17 type Abi = Self; 18 type DefaultType = Self; 19 } 20 unsafe impl ::windows::runtime::RuntimeType for CollectionChange { 21 const SIGNATURE: ::windows::runtime::ConstBuffer = ::windows::runtime::ConstBuffer::from_slice(b"enum(Windows.Foundation.Collections.CollectionChange;i4)"); 22 } 23 #[repr(transparent)] 24 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: clone :: Clone, :: std :: fmt :: Debug)] 25 pub struct IIterable<T>(::windows::runtime::IInspectable, ::std::marker::PhantomData<T>) 26 where 27 T: ::windows::runtime::RuntimeType + 'static; 28 unsafe impl<T: ::windows::runtime::RuntimeType + 'static> ::windows::runtime::Interface for IIterable<T> { 29 type Vtable = IIterable_abi<T>; 30 const IID: ::windows::runtime::GUID = ::windows::runtime::GUID::from_signature(<IIterable<T> as ::windows::runtime::RuntimeType>::SIGNATURE); 31 } 32 impl<T: ::windows::runtime::RuntimeType + 'static> IIterable<T> { First(&self) -> ::windows::runtime::Result<IIterator<T>>33 pub fn First(&self) -> ::windows::runtime::Result<IIterator<T>> { 34 let this = self; 35 unsafe { 36 let mut result__: ::windows::runtime::RawPtr = ::std::mem::zeroed(); 37 (::windows::runtime::Interface::vtable(this).6)(::std::mem::transmute_copy(this), &mut result__).from_abi::<IIterator<T>>(result__) 38 } 39 } 40 } 41 unsafe impl<T: ::windows::runtime::RuntimeType + 'static> ::windows::runtime::RuntimeType for IIterable<T> { 42 const SIGNATURE: ::windows::runtime::ConstBuffer = { ::windows::runtime::ConstBuffer::new().push_slice(b"pinterface(").push_slice(b"{faa585ea-6214-4217-afda-7f46de5869b3}").push_slice(b";").push_other(<T as ::windows::runtime::RuntimeType>::SIGNATURE).push_slice(b")") }; 43 } 44 impl<T: ::windows::runtime::RuntimeType + 'static> ::std::convert::From<IIterable<T>> for ::windows::runtime::IUnknown { from(value: IIterable<T>) -> Self45 fn from(value: IIterable<T>) -> Self { 46 unsafe { ::std::mem::transmute(value) } 47 } 48 } 49 impl<T: ::windows::runtime::RuntimeType + 'static> ::std::convert::From<&IIterable<T>> for ::windows::runtime::IUnknown { from(value: &IIterable<T>) -> Self50 fn from(value: &IIterable<T>) -> Self { 51 ::std::convert::From::from(::std::clone::Clone::clone(value)) 52 } 53 } 54 impl<'a, T: ::windows::runtime::RuntimeType + 'static> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for IIterable<T> { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown>55 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> { 56 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(self)) 57 } 58 } 59 impl<'a, T: ::windows::runtime::RuntimeType + 'static> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for &IIterable<T> { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown>60 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> { 61 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(::std::clone::Clone::clone(self))) 62 } 63 } 64 impl<T: ::windows::runtime::RuntimeType + 'static> ::std::convert::From<IIterable<T>> for ::windows::runtime::IInspectable { from(value: IIterable<T>) -> Self65 fn from(value: IIterable<T>) -> Self { 66 value.0 67 } 68 } 69 impl<T: ::windows::runtime::RuntimeType + 'static> ::std::convert::From<&IIterable<T>> for ::windows::runtime::IInspectable { from(value: &IIterable<T>) -> Self70 fn from(value: &IIterable<T>) -> Self { 71 value.0.clone() 72 } 73 } 74 impl<'a, T: ::windows::runtime::RuntimeType + 'static> ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable> for IIterable<T> { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable>75 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable> { 76 ::windows::runtime::Param::Owned(self.0) 77 } 78 } 79 impl<'a, T: ::windows::runtime::RuntimeType + 'static> ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable> for &'a IIterable<T> { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable>80 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable> { 81 ::windows::runtime::Param::Borrowed(&self.0) 82 } 83 } 84 impl<T: ::windows::runtime::RuntimeType> ::std::iter::IntoIterator for IIterable<T> { 85 type Item = T; 86 type IntoIter = IIterator<Self::Item>; into_iter(self) -> Self::IntoIter87 fn into_iter(self) -> Self::IntoIter { 88 ::std::iter::IntoIterator::into_iter(&self) 89 } 90 } 91 impl<T: ::windows::runtime::RuntimeType> ::std::iter::IntoIterator for &IIterable<T> { 92 type Item = T; 93 type IntoIter = IIterator<Self::Item>; into_iter(self) -> Self::IntoIter94 fn into_iter(self) -> Self::IntoIter { 95 self.First().unwrap() 96 } 97 } 98 #[repr(C)] 99 #[doc(hidden)] 100 pub struct IIterable_abi<T>( 101 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, iid: &::windows::runtime::GUID, interface: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 102 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32, 103 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32, 104 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, count: *mut u32, values: *mut *mut ::windows::runtime::GUID) -> ::windows::runtime::HRESULT, 105 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 106 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut i32) -> ::windows::runtime::HRESULT, 107 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, result__: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 108 pub ::std::marker::PhantomData<T>, 109 ) 110 where 111 T: ::windows::runtime::RuntimeType + 'static; 112 #[repr(transparent)] 113 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: clone :: Clone, :: std :: fmt :: Debug)] 114 pub struct IIterator<T>(::windows::runtime::IInspectable, ::std::marker::PhantomData<T>) 115 where 116 T: ::windows::runtime::RuntimeType + 'static; 117 unsafe impl<T: ::windows::runtime::RuntimeType + 'static> ::windows::runtime::Interface for IIterator<T> { 118 type Vtable = IIterator_abi<T>; 119 const IID: ::windows::runtime::GUID = ::windows::runtime::GUID::from_signature(<IIterator<T> as ::windows::runtime::RuntimeType>::SIGNATURE); 120 } 121 impl<T: ::windows::runtime::RuntimeType + 'static> IIterator<T> { Current(&self) -> ::windows::runtime::Result<T>122 pub fn Current(&self) -> ::windows::runtime::Result<T> { 123 let this = self; 124 unsafe { 125 let mut result__: <T as ::windows::runtime::Abi>::Abi = ::std::mem::zeroed(); 126 (::windows::runtime::Interface::vtable(this).6)(::std::mem::transmute_copy(this), &mut result__).from_abi::<T>(result__) 127 } 128 } HasCurrent(&self) -> ::windows::runtime::Result<bool>129 pub fn HasCurrent(&self) -> ::windows::runtime::Result<bool> { 130 let this = self; 131 unsafe { 132 let mut result__: bool = ::std::mem::zeroed(); 133 (::windows::runtime::Interface::vtable(this).7)(::std::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) 134 } 135 } MoveNext(&self) -> ::windows::runtime::Result<bool>136 pub fn MoveNext(&self) -> ::windows::runtime::Result<bool> { 137 let this = self; 138 unsafe { 139 let mut result__: bool = ::std::mem::zeroed(); 140 (::windows::runtime::Interface::vtable(this).8)(::std::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) 141 } 142 } GetMany(&self, items: &mut [<T as ::windows::runtime::Abi>::DefaultType]) -> ::windows::runtime::Result<u32>143 pub fn GetMany(&self, items: &mut [<T as ::windows::runtime::Abi>::DefaultType]) -> ::windows::runtime::Result<u32> { 144 let this = self; 145 unsafe { 146 let mut result__: u32 = ::std::mem::zeroed(); 147 (::windows::runtime::Interface::vtable(this).9)(::std::mem::transmute_copy(this), items.len() as u32, ::std::mem::transmute_copy(&items), &mut result__).from_abi::<u32>(result__) 148 } 149 } 150 } 151 unsafe impl<T: ::windows::runtime::RuntimeType + 'static> ::windows::runtime::RuntimeType for IIterator<T> { 152 const SIGNATURE: ::windows::runtime::ConstBuffer = { ::windows::runtime::ConstBuffer::new().push_slice(b"pinterface(").push_slice(b"{6a79e863-4300-459a-9966-cbb660963ee1}").push_slice(b";").push_other(<T as ::windows::runtime::RuntimeType>::SIGNATURE).push_slice(b")") }; 153 } 154 impl<T: ::windows::runtime::RuntimeType + 'static> ::std::convert::From<IIterator<T>> for ::windows::runtime::IUnknown { from(value: IIterator<T>) -> Self155 fn from(value: IIterator<T>) -> Self { 156 unsafe { ::std::mem::transmute(value) } 157 } 158 } 159 impl<T: ::windows::runtime::RuntimeType + 'static> ::std::convert::From<&IIterator<T>> for ::windows::runtime::IUnknown { from(value: &IIterator<T>) -> Self160 fn from(value: &IIterator<T>) -> Self { 161 ::std::convert::From::from(::std::clone::Clone::clone(value)) 162 } 163 } 164 impl<'a, T: ::windows::runtime::RuntimeType + 'static> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for IIterator<T> { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown>165 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> { 166 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(self)) 167 } 168 } 169 impl<'a, T: ::windows::runtime::RuntimeType + 'static> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for &IIterator<T> { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown>170 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> { 171 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(::std::clone::Clone::clone(self))) 172 } 173 } 174 impl<T: ::windows::runtime::RuntimeType + 'static> ::std::convert::From<IIterator<T>> for ::windows::runtime::IInspectable { from(value: IIterator<T>) -> Self175 fn from(value: IIterator<T>) -> Self { 176 value.0 177 } 178 } 179 impl<T: ::windows::runtime::RuntimeType + 'static> ::std::convert::From<&IIterator<T>> for ::windows::runtime::IInspectable { from(value: &IIterator<T>) -> Self180 fn from(value: &IIterator<T>) -> Self { 181 value.0.clone() 182 } 183 } 184 impl<'a, T: ::windows::runtime::RuntimeType + 'static> ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable> for IIterator<T> { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable>185 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable> { 186 ::windows::runtime::Param::Owned(self.0) 187 } 188 } 189 impl<'a, T: ::windows::runtime::RuntimeType + 'static> ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable> for &'a IIterator<T> { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable>190 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable> { 191 ::windows::runtime::Param::Borrowed(&self.0) 192 } 193 } 194 impl<T: ::windows::runtime::RuntimeType> ::std::iter::Iterator for IIterator<T> { 195 type Item = T; next(&mut self) -> ::std::option::Option<Self::Item>196 fn next(&mut self) -> ::std::option::Option<Self::Item> { 197 let result = self.Current().ok(); 198 if result.is_some() { 199 self.MoveNext().ok()?; 200 } 201 result 202 } 203 } 204 #[repr(C)] 205 #[doc(hidden)] 206 pub struct IIterator_abi<T>( 207 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, iid: &::windows::runtime::GUID, interface: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 208 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32, 209 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32, 210 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, count: *mut u32, values: *mut *mut ::windows::runtime::GUID) -> ::windows::runtime::HRESULT, 211 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 212 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut i32) -> ::windows::runtime::HRESULT, 213 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, result__: *mut <T as ::windows::runtime::Abi>::Abi) -> ::windows::runtime::HRESULT, 214 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, result__: *mut bool) -> ::windows::runtime::HRESULT, 215 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, result__: *mut bool) -> ::windows::runtime::HRESULT, 216 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, items_array_size: u32, items: *mut <T as ::windows::runtime::Abi>::Abi, result__: *mut u32) -> ::windows::runtime::HRESULT, 217 pub ::std::marker::PhantomData<T>, 218 ) 219 where 220 T: ::windows::runtime::RuntimeType + 'static; 221 #[repr(transparent)] 222 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: clone :: Clone, :: std :: fmt :: Debug)] 223 pub struct IKeyValuePair<K, V>(::windows::runtime::IInspectable, ::std::marker::PhantomData<K>, ::std::marker::PhantomData<V>) 224 where 225 K: ::windows::runtime::RuntimeType + 'static, 226 V: ::windows::runtime::RuntimeType + 'static; 227 unsafe impl<K: ::windows::runtime::RuntimeType + 'static, V: ::windows::runtime::RuntimeType + 'static> ::windows::runtime::Interface for IKeyValuePair<K, V> { 228 type Vtable = IKeyValuePair_abi<K, V>; 229 const IID: ::windows::runtime::GUID = ::windows::runtime::GUID::from_signature(<IKeyValuePair<K, V> as ::windows::runtime::RuntimeType>::SIGNATURE); 230 } 231 impl<K: ::windows::runtime::RuntimeType + 'static, V: ::windows::runtime::RuntimeType + 'static> IKeyValuePair<K, V> { Key(&self) -> ::windows::runtime::Result<K>232 pub fn Key(&self) -> ::windows::runtime::Result<K> { 233 let this = self; 234 unsafe { 235 let mut result__: <K as ::windows::runtime::Abi>::Abi = ::std::mem::zeroed(); 236 (::windows::runtime::Interface::vtable(this).6)(::std::mem::transmute_copy(this), &mut result__).from_abi::<K>(result__) 237 } 238 } Value(&self) -> ::windows::runtime::Result<V>239 pub fn Value(&self) -> ::windows::runtime::Result<V> { 240 let this = self; 241 unsafe { 242 let mut result__: <V as ::windows::runtime::Abi>::Abi = ::std::mem::zeroed(); 243 (::windows::runtime::Interface::vtable(this).7)(::std::mem::transmute_copy(this), &mut result__).from_abi::<V>(result__) 244 } 245 } 246 } 247 unsafe impl<K: ::windows::runtime::RuntimeType + 'static, V: ::windows::runtime::RuntimeType + 'static> ::windows::runtime::RuntimeType for IKeyValuePair<K, V> { 248 const SIGNATURE: ::windows::runtime::ConstBuffer = { ::windows::runtime::ConstBuffer::new().push_slice(b"pinterface(").push_slice(b"{02b51929-c1c4-4a7e-8940-0312b5c18500}").push_slice(b";").push_other(<K as ::windows::runtime::RuntimeType>::SIGNATURE).push_slice(b";").push_other(<V as ::windows::runtime::RuntimeType>::SIGNATURE).push_slice(b")") }; 249 } 250 impl<K: ::windows::runtime::RuntimeType + 'static, V: ::windows::runtime::RuntimeType + 'static> ::std::convert::From<IKeyValuePair<K, V>> for ::windows::runtime::IUnknown { from(value: IKeyValuePair<K, V>) -> Self251 fn from(value: IKeyValuePair<K, V>) -> Self { 252 unsafe { ::std::mem::transmute(value) } 253 } 254 } 255 impl<K: ::windows::runtime::RuntimeType + 'static, V: ::windows::runtime::RuntimeType + 'static> ::std::convert::From<&IKeyValuePair<K, V>> for ::windows::runtime::IUnknown { from(value: &IKeyValuePair<K, V>) -> Self256 fn from(value: &IKeyValuePair<K, V>) -> Self { 257 ::std::convert::From::from(::std::clone::Clone::clone(value)) 258 } 259 } 260 impl<'a, K: ::windows::runtime::RuntimeType + 'static, V: ::windows::runtime::RuntimeType + 'static> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for IKeyValuePair<K, V> { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown>261 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> { 262 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(self)) 263 } 264 } 265 impl<'a, K: ::windows::runtime::RuntimeType + 'static, V: ::windows::runtime::RuntimeType + 'static> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for &IKeyValuePair<K, V> { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown>266 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> { 267 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(::std::clone::Clone::clone(self))) 268 } 269 } 270 impl<K: ::windows::runtime::RuntimeType + 'static, V: ::windows::runtime::RuntimeType + 'static> ::std::convert::From<IKeyValuePair<K, V>> for ::windows::runtime::IInspectable { from(value: IKeyValuePair<K, V>) -> Self271 fn from(value: IKeyValuePair<K, V>) -> Self { 272 value.0 273 } 274 } 275 impl<K: ::windows::runtime::RuntimeType + 'static, V: ::windows::runtime::RuntimeType + 'static> ::std::convert::From<&IKeyValuePair<K, V>> for ::windows::runtime::IInspectable { from(value: &IKeyValuePair<K, V>) -> Self276 fn from(value: &IKeyValuePair<K, V>) -> Self { 277 value.0.clone() 278 } 279 } 280 impl<'a, K: ::windows::runtime::RuntimeType + 'static, V: ::windows::runtime::RuntimeType + 'static> ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable> for IKeyValuePair<K, V> { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable>281 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable> { 282 ::windows::runtime::Param::Owned(self.0) 283 } 284 } 285 impl<'a, K: ::windows::runtime::RuntimeType + 'static, V: ::windows::runtime::RuntimeType + 'static> ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable> for &'a IKeyValuePair<K, V> { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable>286 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable> { 287 ::windows::runtime::Param::Borrowed(&self.0) 288 } 289 } 290 #[repr(C)] 291 #[doc(hidden)] 292 pub struct IKeyValuePair_abi<K, V>( 293 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, iid: &::windows::runtime::GUID, interface: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 294 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32, 295 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32, 296 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, count: *mut u32, values: *mut *mut ::windows::runtime::GUID) -> ::windows::runtime::HRESULT, 297 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 298 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut i32) -> ::windows::runtime::HRESULT, 299 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, result__: *mut <K as ::windows::runtime::Abi>::Abi) -> ::windows::runtime::HRESULT, 300 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, result__: *mut <V as ::windows::runtime::Abi>::Abi) -> ::windows::runtime::HRESULT, 301 pub ::std::marker::PhantomData<K>, 302 pub ::std::marker::PhantomData<V>, 303 ) 304 where 305 K: ::windows::runtime::RuntimeType + 'static, 306 V: ::windows::runtime::RuntimeType + 'static; 307 #[repr(transparent)] 308 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: clone :: Clone, :: std :: fmt :: Debug)] 309 pub struct IMap<K, V>(::windows::runtime::IInspectable, ::std::marker::PhantomData<K>, ::std::marker::PhantomData<V>) 310 where 311 K: ::windows::runtime::RuntimeType + 'static, 312 V: ::windows::runtime::RuntimeType + 'static; 313 unsafe impl<K: ::windows::runtime::RuntimeType + 'static, V: ::windows::runtime::RuntimeType + 'static> ::windows::runtime::Interface for IMap<K, V> { 314 type Vtable = IMap_abi<K, V>; 315 const IID: ::windows::runtime::GUID = ::windows::runtime::GUID::from_signature(<IMap<K, V> as ::windows::runtime::RuntimeType>::SIGNATURE); 316 } 317 impl<K: ::windows::runtime::RuntimeType + 'static, V: ::windows::runtime::RuntimeType + 'static> IMap<K, V> { Lookup<'a, Param0: ::windows::runtime::IntoParam<'a, K>>(&self, key: Param0) -> ::windows::runtime::Result<V>318 pub fn Lookup<'a, Param0: ::windows::runtime::IntoParam<'a, K>>(&self, key: Param0) -> ::windows::runtime::Result<V> { 319 let this = self; 320 unsafe { 321 let mut result__: <V as ::windows::runtime::Abi>::Abi = ::std::mem::zeroed(); 322 (::windows::runtime::Interface::vtable(this).6)(::std::mem::transmute_copy(this), key.into_param().abi(), &mut result__).from_abi::<V>(result__) 323 } 324 } Size(&self) -> ::windows::runtime::Result<u32>325 pub fn Size(&self) -> ::windows::runtime::Result<u32> { 326 let this = self; 327 unsafe { 328 let mut result__: u32 = ::std::mem::zeroed(); 329 (::windows::runtime::Interface::vtable(this).7)(::std::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) 330 } 331 } HasKey<'a, Param0: ::windows::runtime::IntoParam<'a, K>>(&self, key: Param0) -> ::windows::runtime::Result<bool>332 pub fn HasKey<'a, Param0: ::windows::runtime::IntoParam<'a, K>>(&self, key: Param0) -> ::windows::runtime::Result<bool> { 333 let this = self; 334 unsafe { 335 let mut result__: bool = ::std::mem::zeroed(); 336 (::windows::runtime::Interface::vtable(this).8)(::std::mem::transmute_copy(this), key.into_param().abi(), &mut result__).from_abi::<bool>(result__) 337 } 338 } GetView(&self) -> ::windows::runtime::Result<IMapView<K, V>>339 pub fn GetView(&self) -> ::windows::runtime::Result<IMapView<K, V>> { 340 let this = self; 341 unsafe { 342 let mut result__: ::windows::runtime::RawPtr = ::std::mem::zeroed(); 343 (::windows::runtime::Interface::vtable(this).9)(::std::mem::transmute_copy(this), &mut result__).from_abi::<IMapView<K, V>>(result__) 344 } 345 } Insert<'a, Param0: ::windows::runtime::IntoParam<'a, K>, Param1: ::windows::runtime::IntoParam<'a, V>>(&self, key: Param0, value: Param1) -> ::windows::runtime::Result<bool>346 pub fn Insert<'a, Param0: ::windows::runtime::IntoParam<'a, K>, Param1: ::windows::runtime::IntoParam<'a, V>>(&self, key: Param0, value: Param1) -> ::windows::runtime::Result<bool> { 347 let this = self; 348 unsafe { 349 let mut result__: bool = ::std::mem::zeroed(); 350 (::windows::runtime::Interface::vtable(this).10)(::std::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi(), &mut result__).from_abi::<bool>(result__) 351 } 352 } Remove<'a, Param0: ::windows::runtime::IntoParam<'a, K>>(&self, key: Param0) -> ::windows::runtime::Result<()>353 pub fn Remove<'a, Param0: ::windows::runtime::IntoParam<'a, K>>(&self, key: Param0) -> ::windows::runtime::Result<()> { 354 let this = self; 355 unsafe { (::windows::runtime::Interface::vtable(this).11)(::std::mem::transmute_copy(this), key.into_param().abi()).ok() } 356 } Clear(&self) -> ::windows::runtime::Result<()>357 pub fn Clear(&self) -> ::windows::runtime::Result<()> { 358 let this = self; 359 unsafe { (::windows::runtime::Interface::vtable(this).12)(::std::mem::transmute_copy(this)).ok() } 360 } First(&self) -> ::windows::runtime::Result<IIterator<IKeyValuePair<K, V>>>361 pub fn First(&self) -> ::windows::runtime::Result<IIterator<IKeyValuePair<K, V>>> { 362 let this = &::windows::runtime::Interface::cast::<IIterable<IKeyValuePair<K, V>>>(self)?; 363 unsafe { 364 let mut result__: ::windows::runtime::RawPtr = ::std::mem::zeroed(); 365 (::windows::runtime::Interface::vtable(this).6)(::std::mem::transmute_copy(this), &mut result__).from_abi::<IIterator<IKeyValuePair<K, V>>>(result__) 366 } 367 } 368 } 369 unsafe impl<K: ::windows::runtime::RuntimeType + 'static, V: ::windows::runtime::RuntimeType + 'static> ::windows::runtime::RuntimeType for IMap<K, V> { 370 const SIGNATURE: ::windows::runtime::ConstBuffer = { ::windows::runtime::ConstBuffer::new().push_slice(b"pinterface(").push_slice(b"{3c2925fe-8519-45c1-aa79-197b6718c1c1}").push_slice(b";").push_other(<K as ::windows::runtime::RuntimeType>::SIGNATURE).push_slice(b";").push_other(<V as ::windows::runtime::RuntimeType>::SIGNATURE).push_slice(b")") }; 371 } 372 impl<K: ::windows::runtime::RuntimeType + 'static, V: ::windows::runtime::RuntimeType + 'static> ::std::convert::From<IMap<K, V>> for ::windows::runtime::IUnknown { from(value: IMap<K, V>) -> Self373 fn from(value: IMap<K, V>) -> Self { 374 unsafe { ::std::mem::transmute(value) } 375 } 376 } 377 impl<K: ::windows::runtime::RuntimeType + 'static, V: ::windows::runtime::RuntimeType + 'static> ::std::convert::From<&IMap<K, V>> for ::windows::runtime::IUnknown { from(value: &IMap<K, V>) -> Self378 fn from(value: &IMap<K, V>) -> Self { 379 ::std::convert::From::from(::std::clone::Clone::clone(value)) 380 } 381 } 382 impl<'a, K: ::windows::runtime::RuntimeType + 'static, V: ::windows::runtime::RuntimeType + 'static> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for IMap<K, V> { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown>383 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> { 384 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(self)) 385 } 386 } 387 impl<'a, K: ::windows::runtime::RuntimeType + 'static, V: ::windows::runtime::RuntimeType + 'static> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for &IMap<K, V> { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown>388 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> { 389 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(::std::clone::Clone::clone(self))) 390 } 391 } 392 impl<K: ::windows::runtime::RuntimeType + 'static, V: ::windows::runtime::RuntimeType + 'static> ::std::convert::From<IMap<K, V>> for ::windows::runtime::IInspectable { from(value: IMap<K, V>) -> Self393 fn from(value: IMap<K, V>) -> Self { 394 value.0 395 } 396 } 397 impl<K: ::windows::runtime::RuntimeType + 'static, V: ::windows::runtime::RuntimeType + 'static> ::std::convert::From<&IMap<K, V>> for ::windows::runtime::IInspectable { from(value: &IMap<K, V>) -> Self398 fn from(value: &IMap<K, V>) -> Self { 399 value.0.clone() 400 } 401 } 402 impl<'a, K: ::windows::runtime::RuntimeType + 'static, V: ::windows::runtime::RuntimeType + 'static> ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable> for IMap<K, V> { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable>403 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable> { 404 ::windows::runtime::Param::Owned(self.0) 405 } 406 } 407 impl<'a, K: ::windows::runtime::RuntimeType + 'static, V: ::windows::runtime::RuntimeType + 'static> ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable> for &'a IMap<K, V> { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable>408 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable> { 409 ::windows::runtime::Param::Borrowed(&self.0) 410 } 411 } 412 impl<K: ::windows::runtime::RuntimeType + 'static, V: ::windows::runtime::RuntimeType + 'static> ::std::convert::TryFrom<IMap<K, V>> for IIterable<IKeyValuePair<K, V>> { 413 type Error = ::windows::runtime::Error; try_from(value: IMap<K, V>) -> ::windows::runtime::Result<Self>414 fn try_from(value: IMap<K, V>) -> ::windows::runtime::Result<Self> { 415 ::std::convert::TryFrom::try_from(&value) 416 } 417 } 418 impl<K: ::windows::runtime::RuntimeType + 'static, V: ::windows::runtime::RuntimeType + 'static> ::std::convert::TryFrom<&IMap<K, V>> for IIterable<IKeyValuePair<K, V>> { 419 type Error = ::windows::runtime::Error; try_from(value: &IMap<K, V>) -> ::windows::runtime::Result<Self>420 fn try_from(value: &IMap<K, V>) -> ::windows::runtime::Result<Self> { 421 ::windows::runtime::Interface::cast(value) 422 } 423 } 424 impl<'a, K: ::windows::runtime::RuntimeType + 'static, V: ::windows::runtime::RuntimeType + 'static> ::windows::runtime::IntoParam<'a, IIterable<IKeyValuePair<K, V>>> for IMap<K, V> { into_param(self) -> ::windows::runtime::Param<'a, IIterable<IKeyValuePair<K, V>>>425 fn into_param(self) -> ::windows::runtime::Param<'a, IIterable<IKeyValuePair<K, V>>> { 426 ::windows::runtime::IntoParam::into_param(&self) 427 } 428 } 429 impl<'a, K: ::windows::runtime::RuntimeType + 'static, V: ::windows::runtime::RuntimeType + 'static> ::windows::runtime::IntoParam<'a, IIterable<IKeyValuePair<K, V>>> for &IMap<K, V> { into_param(self) -> ::windows::runtime::Param<'a, IIterable<IKeyValuePair<K, V>>>430 fn into_param(self) -> ::windows::runtime::Param<'a, IIterable<IKeyValuePair<K, V>>> { 431 ::std::convert::TryInto::<IIterable<IKeyValuePair<K, V>>>::try_into(self).map(::windows::runtime::Param::Owned).unwrap_or(::windows::runtime::Param::None) 432 } 433 } 434 #[cfg(all(feature = "Foundation_Collections"))] 435 impl<K: ::windows::runtime::RuntimeType + 'static, V: ::windows::runtime::RuntimeType + 'static> ::std::iter::IntoIterator for IMap<K, V> { 436 type Item = IKeyValuePair<K, V>; 437 type IntoIter = IIterator<Self::Item>; into_iter(self) -> Self::IntoIter438 fn into_iter(self) -> Self::IntoIter { 439 ::std::iter::IntoIterator::into_iter(&self) 440 } 441 } 442 #[cfg(all(feature = "Foundation_Collections"))] 443 impl<K: ::windows::runtime::RuntimeType + 'static, V: ::windows::runtime::RuntimeType + 'static> ::std::iter::IntoIterator for &IMap<K, V> { 444 type Item = IKeyValuePair<K, V>; 445 type IntoIter = IIterator<Self::Item>; into_iter(self) -> Self::IntoIter446 fn into_iter(self) -> Self::IntoIter { 447 self.First().unwrap() 448 } 449 } 450 #[repr(C)] 451 #[doc(hidden)] 452 pub struct IMap_abi<K, V>( 453 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, iid: &::windows::runtime::GUID, interface: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 454 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32, 455 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32, 456 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, count: *mut u32, values: *mut *mut ::windows::runtime::GUID) -> ::windows::runtime::HRESULT, 457 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 458 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut i32) -> ::windows::runtime::HRESULT, 459 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, key: <K as ::windows::runtime::Abi>::Abi, result__: *mut <V as ::windows::runtime::Abi>::Abi) -> ::windows::runtime::HRESULT, 460 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, result__: *mut u32) -> ::windows::runtime::HRESULT, 461 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, key: <K as ::windows::runtime::Abi>::Abi, result__: *mut bool) -> ::windows::runtime::HRESULT, 462 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, result__: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 463 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, key: <K as ::windows::runtime::Abi>::Abi, value: <V as ::windows::runtime::Abi>::Abi, result__: *mut bool) -> ::windows::runtime::HRESULT, 464 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, key: <K as ::windows::runtime::Abi>::Abi) -> ::windows::runtime::HRESULT, 465 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 466 pub ::std::marker::PhantomData<K>, 467 pub ::std::marker::PhantomData<V>, 468 ) 469 where 470 K: ::windows::runtime::RuntimeType + 'static, 471 V: ::windows::runtime::RuntimeType + 'static; 472 #[repr(transparent)] 473 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: clone :: Clone, :: std :: fmt :: Debug)] 474 pub struct IMapChangedEventArgs<K>(::windows::runtime::IInspectable, ::std::marker::PhantomData<K>) 475 where 476 K: ::windows::runtime::RuntimeType + 'static; 477 unsafe impl<K: ::windows::runtime::RuntimeType + 'static> ::windows::runtime::Interface for IMapChangedEventArgs<K> { 478 type Vtable = IMapChangedEventArgs_abi<K>; 479 const IID: ::windows::runtime::GUID = ::windows::runtime::GUID::from_signature(<IMapChangedEventArgs<K> as ::windows::runtime::RuntimeType>::SIGNATURE); 480 } 481 impl<K: ::windows::runtime::RuntimeType + 'static> IMapChangedEventArgs<K> { CollectionChange(&self) -> ::windows::runtime::Result<CollectionChange>482 pub fn CollectionChange(&self) -> ::windows::runtime::Result<CollectionChange> { 483 let this = self; 484 unsafe { 485 let mut result__: CollectionChange = ::std::mem::zeroed(); 486 (::windows::runtime::Interface::vtable(this).6)(::std::mem::transmute_copy(this), &mut result__).from_abi::<CollectionChange>(result__) 487 } 488 } Key(&self) -> ::windows::runtime::Result<K>489 pub fn Key(&self) -> ::windows::runtime::Result<K> { 490 let this = self; 491 unsafe { 492 let mut result__: <K as ::windows::runtime::Abi>::Abi = ::std::mem::zeroed(); 493 (::windows::runtime::Interface::vtable(this).7)(::std::mem::transmute_copy(this), &mut result__).from_abi::<K>(result__) 494 } 495 } 496 } 497 unsafe impl<K: ::windows::runtime::RuntimeType + 'static> ::windows::runtime::RuntimeType for IMapChangedEventArgs<K> { 498 const SIGNATURE: ::windows::runtime::ConstBuffer = { ::windows::runtime::ConstBuffer::new().push_slice(b"pinterface(").push_slice(b"{9939f4df-050a-4c0f-aa60-77075f9c4777}").push_slice(b";").push_other(<K as ::windows::runtime::RuntimeType>::SIGNATURE).push_slice(b")") }; 499 } 500 impl<K: ::windows::runtime::RuntimeType + 'static> ::std::convert::From<IMapChangedEventArgs<K>> for ::windows::runtime::IUnknown { from(value: IMapChangedEventArgs<K>) -> Self501 fn from(value: IMapChangedEventArgs<K>) -> Self { 502 unsafe { ::std::mem::transmute(value) } 503 } 504 } 505 impl<K: ::windows::runtime::RuntimeType + 'static> ::std::convert::From<&IMapChangedEventArgs<K>> for ::windows::runtime::IUnknown { from(value: &IMapChangedEventArgs<K>) -> Self506 fn from(value: &IMapChangedEventArgs<K>) -> Self { 507 ::std::convert::From::from(::std::clone::Clone::clone(value)) 508 } 509 } 510 impl<'a, K: ::windows::runtime::RuntimeType + 'static> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for IMapChangedEventArgs<K> { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown>511 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> { 512 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(self)) 513 } 514 } 515 impl<'a, K: ::windows::runtime::RuntimeType + 'static> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for &IMapChangedEventArgs<K> { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown>516 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> { 517 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(::std::clone::Clone::clone(self))) 518 } 519 } 520 impl<K: ::windows::runtime::RuntimeType + 'static> ::std::convert::From<IMapChangedEventArgs<K>> for ::windows::runtime::IInspectable { from(value: IMapChangedEventArgs<K>) -> Self521 fn from(value: IMapChangedEventArgs<K>) -> Self { 522 value.0 523 } 524 } 525 impl<K: ::windows::runtime::RuntimeType + 'static> ::std::convert::From<&IMapChangedEventArgs<K>> for ::windows::runtime::IInspectable { from(value: &IMapChangedEventArgs<K>) -> Self526 fn from(value: &IMapChangedEventArgs<K>) -> Self { 527 value.0.clone() 528 } 529 } 530 impl<'a, K: ::windows::runtime::RuntimeType + 'static> ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable> for IMapChangedEventArgs<K> { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable>531 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable> { 532 ::windows::runtime::Param::Owned(self.0) 533 } 534 } 535 impl<'a, K: ::windows::runtime::RuntimeType + 'static> ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable> for &'a IMapChangedEventArgs<K> { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable>536 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable> { 537 ::windows::runtime::Param::Borrowed(&self.0) 538 } 539 } 540 #[repr(C)] 541 #[doc(hidden)] 542 pub struct IMapChangedEventArgs_abi<K>( 543 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, iid: &::windows::runtime::GUID, interface: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 544 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32, 545 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32, 546 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, count: *mut u32, values: *mut *mut ::windows::runtime::GUID) -> ::windows::runtime::HRESULT, 547 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 548 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut i32) -> ::windows::runtime::HRESULT, 549 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, result__: *mut CollectionChange) -> ::windows::runtime::HRESULT, 550 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, result__: *mut <K as ::windows::runtime::Abi>::Abi) -> ::windows::runtime::HRESULT, 551 pub ::std::marker::PhantomData<K>, 552 ) 553 where 554 K: ::windows::runtime::RuntimeType + 'static; 555 #[repr(transparent)] 556 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: clone :: Clone, :: std :: fmt :: Debug)] 557 pub struct IMapView<K, V>(::windows::runtime::IInspectable, ::std::marker::PhantomData<K>, ::std::marker::PhantomData<V>) 558 where 559 K: ::windows::runtime::RuntimeType + 'static, 560 V: ::windows::runtime::RuntimeType + 'static; 561 unsafe impl<K: ::windows::runtime::RuntimeType + 'static, V: ::windows::runtime::RuntimeType + 'static> ::windows::runtime::Interface for IMapView<K, V> { 562 type Vtable = IMapView_abi<K, V>; 563 const IID: ::windows::runtime::GUID = ::windows::runtime::GUID::from_signature(<IMapView<K, V> as ::windows::runtime::RuntimeType>::SIGNATURE); 564 } 565 impl<K: ::windows::runtime::RuntimeType + 'static, V: ::windows::runtime::RuntimeType + 'static> IMapView<K, V> { Lookup<'a, Param0: ::windows::runtime::IntoParam<'a, K>>(&self, key: Param0) -> ::windows::runtime::Result<V>566 pub fn Lookup<'a, Param0: ::windows::runtime::IntoParam<'a, K>>(&self, key: Param0) -> ::windows::runtime::Result<V> { 567 let this = self; 568 unsafe { 569 let mut result__: <V as ::windows::runtime::Abi>::Abi = ::std::mem::zeroed(); 570 (::windows::runtime::Interface::vtable(this).6)(::std::mem::transmute_copy(this), key.into_param().abi(), &mut result__).from_abi::<V>(result__) 571 } 572 } Size(&self) -> ::windows::runtime::Result<u32>573 pub fn Size(&self) -> ::windows::runtime::Result<u32> { 574 let this = self; 575 unsafe { 576 let mut result__: u32 = ::std::mem::zeroed(); 577 (::windows::runtime::Interface::vtable(this).7)(::std::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) 578 } 579 } HasKey<'a, Param0: ::windows::runtime::IntoParam<'a, K>>(&self, key: Param0) -> ::windows::runtime::Result<bool>580 pub fn HasKey<'a, Param0: ::windows::runtime::IntoParam<'a, K>>(&self, key: Param0) -> ::windows::runtime::Result<bool> { 581 let this = self; 582 unsafe { 583 let mut result__: bool = ::std::mem::zeroed(); 584 (::windows::runtime::Interface::vtable(this).8)(::std::mem::transmute_copy(this), key.into_param().abi(), &mut result__).from_abi::<bool>(result__) 585 } 586 } Split(&self, first: &mut ::std::option::Option<IMapView<K, V>>, second: &mut ::std::option::Option<IMapView<K, V>>) -> ::windows::runtime::Result<()>587 pub fn Split(&self, first: &mut ::std::option::Option<IMapView<K, V>>, second: &mut ::std::option::Option<IMapView<K, V>>) -> ::windows::runtime::Result<()> { 588 let this = self; 589 unsafe { (::windows::runtime::Interface::vtable(this).9)(::std::mem::transmute_copy(this), first as *mut _ as _, second as *mut _ as _).ok() } 590 } First(&self) -> ::windows::runtime::Result<IIterator<IKeyValuePair<K, V>>>591 pub fn First(&self) -> ::windows::runtime::Result<IIterator<IKeyValuePair<K, V>>> { 592 let this = &::windows::runtime::Interface::cast::<IIterable<IKeyValuePair<K, V>>>(self)?; 593 unsafe { 594 let mut result__: ::windows::runtime::RawPtr = ::std::mem::zeroed(); 595 (::windows::runtime::Interface::vtable(this).6)(::std::mem::transmute_copy(this), &mut result__).from_abi::<IIterator<IKeyValuePair<K, V>>>(result__) 596 } 597 } 598 } 599 unsafe impl<K: ::windows::runtime::RuntimeType + 'static, V: ::windows::runtime::RuntimeType + 'static> ::windows::runtime::RuntimeType for IMapView<K, V> { 600 const SIGNATURE: ::windows::runtime::ConstBuffer = { ::windows::runtime::ConstBuffer::new().push_slice(b"pinterface(").push_slice(b"{e480ce40-a338-4ada-adcf-272272e48cb9}").push_slice(b";").push_other(<K as ::windows::runtime::RuntimeType>::SIGNATURE).push_slice(b";").push_other(<V as ::windows::runtime::RuntimeType>::SIGNATURE).push_slice(b")") }; 601 } 602 impl<K: ::windows::runtime::RuntimeType + 'static, V: ::windows::runtime::RuntimeType + 'static> ::std::convert::From<IMapView<K, V>> for ::windows::runtime::IUnknown { from(value: IMapView<K, V>) -> Self603 fn from(value: IMapView<K, V>) -> Self { 604 unsafe { ::std::mem::transmute(value) } 605 } 606 } 607 impl<K: ::windows::runtime::RuntimeType + 'static, V: ::windows::runtime::RuntimeType + 'static> ::std::convert::From<&IMapView<K, V>> for ::windows::runtime::IUnknown { from(value: &IMapView<K, V>) -> Self608 fn from(value: &IMapView<K, V>) -> Self { 609 ::std::convert::From::from(::std::clone::Clone::clone(value)) 610 } 611 } 612 impl<'a, K: ::windows::runtime::RuntimeType + 'static, V: ::windows::runtime::RuntimeType + 'static> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for IMapView<K, V> { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown>613 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> { 614 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(self)) 615 } 616 } 617 impl<'a, K: ::windows::runtime::RuntimeType + 'static, V: ::windows::runtime::RuntimeType + 'static> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for &IMapView<K, V> { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown>618 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> { 619 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(::std::clone::Clone::clone(self))) 620 } 621 } 622 impl<K: ::windows::runtime::RuntimeType + 'static, V: ::windows::runtime::RuntimeType + 'static> ::std::convert::From<IMapView<K, V>> for ::windows::runtime::IInspectable { from(value: IMapView<K, V>) -> Self623 fn from(value: IMapView<K, V>) -> Self { 624 value.0 625 } 626 } 627 impl<K: ::windows::runtime::RuntimeType + 'static, V: ::windows::runtime::RuntimeType + 'static> ::std::convert::From<&IMapView<K, V>> for ::windows::runtime::IInspectable { from(value: &IMapView<K, V>) -> Self628 fn from(value: &IMapView<K, V>) -> Self { 629 value.0.clone() 630 } 631 } 632 impl<'a, K: ::windows::runtime::RuntimeType + 'static, V: ::windows::runtime::RuntimeType + 'static> ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable> for IMapView<K, V> { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable>633 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable> { 634 ::windows::runtime::Param::Owned(self.0) 635 } 636 } 637 impl<'a, K: ::windows::runtime::RuntimeType + 'static, V: ::windows::runtime::RuntimeType + 'static> ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable> for &'a IMapView<K, V> { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable>638 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable> { 639 ::windows::runtime::Param::Borrowed(&self.0) 640 } 641 } 642 impl<K: ::windows::runtime::RuntimeType + 'static, V: ::windows::runtime::RuntimeType + 'static> ::std::convert::TryFrom<IMapView<K, V>> for IIterable<IKeyValuePair<K, V>> { 643 type Error = ::windows::runtime::Error; try_from(value: IMapView<K, V>) -> ::windows::runtime::Result<Self>644 fn try_from(value: IMapView<K, V>) -> ::windows::runtime::Result<Self> { 645 ::std::convert::TryFrom::try_from(&value) 646 } 647 } 648 impl<K: ::windows::runtime::RuntimeType + 'static, V: ::windows::runtime::RuntimeType + 'static> ::std::convert::TryFrom<&IMapView<K, V>> for IIterable<IKeyValuePair<K, V>> { 649 type Error = ::windows::runtime::Error; try_from(value: &IMapView<K, V>) -> ::windows::runtime::Result<Self>650 fn try_from(value: &IMapView<K, V>) -> ::windows::runtime::Result<Self> { 651 ::windows::runtime::Interface::cast(value) 652 } 653 } 654 impl<'a, K: ::windows::runtime::RuntimeType + 'static, V: ::windows::runtime::RuntimeType + 'static> ::windows::runtime::IntoParam<'a, IIterable<IKeyValuePair<K, V>>> for IMapView<K, V> { into_param(self) -> ::windows::runtime::Param<'a, IIterable<IKeyValuePair<K, V>>>655 fn into_param(self) -> ::windows::runtime::Param<'a, IIterable<IKeyValuePair<K, V>>> { 656 ::windows::runtime::IntoParam::into_param(&self) 657 } 658 } 659 impl<'a, K: ::windows::runtime::RuntimeType + 'static, V: ::windows::runtime::RuntimeType + 'static> ::windows::runtime::IntoParam<'a, IIterable<IKeyValuePair<K, V>>> for &IMapView<K, V> { into_param(self) -> ::windows::runtime::Param<'a, IIterable<IKeyValuePair<K, V>>>660 fn into_param(self) -> ::windows::runtime::Param<'a, IIterable<IKeyValuePair<K, V>>> { 661 ::std::convert::TryInto::<IIterable<IKeyValuePair<K, V>>>::try_into(self).map(::windows::runtime::Param::Owned).unwrap_or(::windows::runtime::Param::None) 662 } 663 } 664 #[cfg(all(feature = "Foundation_Collections"))] 665 impl<K: ::windows::runtime::RuntimeType + 'static, V: ::windows::runtime::RuntimeType + 'static> ::std::iter::IntoIterator for IMapView<K, V> { 666 type Item = IKeyValuePair<K, V>; 667 type IntoIter = IIterator<Self::Item>; into_iter(self) -> Self::IntoIter668 fn into_iter(self) -> Self::IntoIter { 669 ::std::iter::IntoIterator::into_iter(&self) 670 } 671 } 672 #[cfg(all(feature = "Foundation_Collections"))] 673 impl<K: ::windows::runtime::RuntimeType + 'static, V: ::windows::runtime::RuntimeType + 'static> ::std::iter::IntoIterator for &IMapView<K, V> { 674 type Item = IKeyValuePair<K, V>; 675 type IntoIter = IIterator<Self::Item>; into_iter(self) -> Self::IntoIter676 fn into_iter(self) -> Self::IntoIter { 677 self.First().unwrap() 678 } 679 } 680 #[repr(C)] 681 #[doc(hidden)] 682 pub struct IMapView_abi<K, V>( 683 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, iid: &::windows::runtime::GUID, interface: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 684 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32, 685 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32, 686 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, count: *mut u32, values: *mut *mut ::windows::runtime::GUID) -> ::windows::runtime::HRESULT, 687 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 688 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut i32) -> ::windows::runtime::HRESULT, 689 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, key: <K as ::windows::runtime::Abi>::Abi, result__: *mut <V as ::windows::runtime::Abi>::Abi) -> ::windows::runtime::HRESULT, 690 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, result__: *mut u32) -> ::windows::runtime::HRESULT, 691 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, key: <K as ::windows::runtime::Abi>::Abi, result__: *mut bool) -> ::windows::runtime::HRESULT, 692 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, first: *mut ::windows::runtime::RawPtr, second: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 693 pub ::std::marker::PhantomData<K>, 694 pub ::std::marker::PhantomData<V>, 695 ) 696 where 697 K: ::windows::runtime::RuntimeType + 'static, 698 V: ::windows::runtime::RuntimeType + 'static; 699 #[repr(transparent)] 700 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: clone :: Clone, :: std :: fmt :: Debug)] 701 pub struct IObservableMap<K, V>(::windows::runtime::IInspectable, ::std::marker::PhantomData<K>, ::std::marker::PhantomData<V>) 702 where 703 K: ::windows::runtime::RuntimeType + 'static, 704 V: ::windows::runtime::RuntimeType + 'static; 705 unsafe impl<K: ::windows::runtime::RuntimeType + 'static, V: ::windows::runtime::RuntimeType + 'static> ::windows::runtime::Interface for IObservableMap<K, V> { 706 type Vtable = IObservableMap_abi<K, V>; 707 const IID: ::windows::runtime::GUID = ::windows::runtime::GUID::from_signature(<IObservableMap<K, V> as ::windows::runtime::RuntimeType>::SIGNATURE); 708 } 709 impl<K: ::windows::runtime::RuntimeType + 'static, V: ::windows::runtime::RuntimeType + 'static> IObservableMap<K, V> { MapChanged<'a, Param0: ::windows::runtime::IntoParam<'a, MapChangedEventHandler<K, V>>>(&self, vhnd: Param0) -> ::windows::runtime::Result<super::EventRegistrationToken>710 pub fn MapChanged<'a, Param0: ::windows::runtime::IntoParam<'a, MapChangedEventHandler<K, V>>>(&self, vhnd: Param0) -> ::windows::runtime::Result<super::EventRegistrationToken> { 711 let this = self; 712 unsafe { 713 let mut result__: super::EventRegistrationToken = ::std::mem::zeroed(); 714 (::windows::runtime::Interface::vtable(this).6)(::std::mem::transmute_copy(this), vhnd.into_param().abi(), &mut result__).from_abi::<super::EventRegistrationToken>(result__) 715 } 716 } RemoveMapChanged<'a, Param0: ::windows::runtime::IntoParam<'a, super::EventRegistrationToken>>(&self, token: Param0) -> ::windows::runtime::Result<()>717 pub fn RemoveMapChanged<'a, Param0: ::windows::runtime::IntoParam<'a, super::EventRegistrationToken>>(&self, token: Param0) -> ::windows::runtime::Result<()> { 718 let this = self; 719 unsafe { (::windows::runtime::Interface::vtable(this).7)(::std::mem::transmute_copy(this), token.into_param().abi()).ok() } 720 } First(&self) -> ::windows::runtime::Result<IIterator<IKeyValuePair<K, V>>>721 pub fn First(&self) -> ::windows::runtime::Result<IIterator<IKeyValuePair<K, V>>> { 722 let this = &::windows::runtime::Interface::cast::<IIterable<IKeyValuePair<K, V>>>(self)?; 723 unsafe { 724 let mut result__: ::windows::runtime::RawPtr = ::std::mem::zeroed(); 725 (::windows::runtime::Interface::vtable(this).6)(::std::mem::transmute_copy(this), &mut result__).from_abi::<IIterator<IKeyValuePair<K, V>>>(result__) 726 } 727 } Lookup<'a, Param0: ::windows::runtime::IntoParam<'a, K>>(&self, key: Param0) -> ::windows::runtime::Result<V>728 pub fn Lookup<'a, Param0: ::windows::runtime::IntoParam<'a, K>>(&self, key: Param0) -> ::windows::runtime::Result<V> { 729 let this = &::windows::runtime::Interface::cast::<IMap<K, V>>(self)?; 730 unsafe { 731 let mut result__: <V as ::windows::runtime::Abi>::Abi = ::std::mem::zeroed(); 732 (::windows::runtime::Interface::vtable(this).6)(::std::mem::transmute_copy(this), key.into_param().abi(), &mut result__).from_abi::<V>(result__) 733 } 734 } Size(&self) -> ::windows::runtime::Result<u32>735 pub fn Size(&self) -> ::windows::runtime::Result<u32> { 736 let this = &::windows::runtime::Interface::cast::<IMap<K, V>>(self)?; 737 unsafe { 738 let mut result__: u32 = ::std::mem::zeroed(); 739 (::windows::runtime::Interface::vtable(this).7)(::std::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) 740 } 741 } HasKey<'a, Param0: ::windows::runtime::IntoParam<'a, K>>(&self, key: Param0) -> ::windows::runtime::Result<bool>742 pub fn HasKey<'a, Param0: ::windows::runtime::IntoParam<'a, K>>(&self, key: Param0) -> ::windows::runtime::Result<bool> { 743 let this = &::windows::runtime::Interface::cast::<IMap<K, V>>(self)?; 744 unsafe { 745 let mut result__: bool = ::std::mem::zeroed(); 746 (::windows::runtime::Interface::vtable(this).8)(::std::mem::transmute_copy(this), key.into_param().abi(), &mut result__).from_abi::<bool>(result__) 747 } 748 } GetView(&self) -> ::windows::runtime::Result<IMapView<K, V>>749 pub fn GetView(&self) -> ::windows::runtime::Result<IMapView<K, V>> { 750 let this = &::windows::runtime::Interface::cast::<IMap<K, V>>(self)?; 751 unsafe { 752 let mut result__: ::windows::runtime::RawPtr = ::std::mem::zeroed(); 753 (::windows::runtime::Interface::vtable(this).9)(::std::mem::transmute_copy(this), &mut result__).from_abi::<IMapView<K, V>>(result__) 754 } 755 } Insert<'a, Param0: ::windows::runtime::IntoParam<'a, K>, Param1: ::windows::runtime::IntoParam<'a, V>>(&self, key: Param0, value: Param1) -> ::windows::runtime::Result<bool>756 pub fn Insert<'a, Param0: ::windows::runtime::IntoParam<'a, K>, Param1: ::windows::runtime::IntoParam<'a, V>>(&self, key: Param0, value: Param1) -> ::windows::runtime::Result<bool> { 757 let this = &::windows::runtime::Interface::cast::<IMap<K, V>>(self)?; 758 unsafe { 759 let mut result__: bool = ::std::mem::zeroed(); 760 (::windows::runtime::Interface::vtable(this).10)(::std::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi(), &mut result__).from_abi::<bool>(result__) 761 } 762 } Remove<'a, Param0: ::windows::runtime::IntoParam<'a, K>>(&self, key: Param0) -> ::windows::runtime::Result<()>763 pub fn Remove<'a, Param0: ::windows::runtime::IntoParam<'a, K>>(&self, key: Param0) -> ::windows::runtime::Result<()> { 764 let this = &::windows::runtime::Interface::cast::<IMap<K, V>>(self)?; 765 unsafe { (::windows::runtime::Interface::vtable(this).11)(::std::mem::transmute_copy(this), key.into_param().abi()).ok() } 766 } Clear(&self) -> ::windows::runtime::Result<()>767 pub fn Clear(&self) -> ::windows::runtime::Result<()> { 768 let this = &::windows::runtime::Interface::cast::<IMap<K, V>>(self)?; 769 unsafe { (::windows::runtime::Interface::vtable(this).12)(::std::mem::transmute_copy(this)).ok() } 770 } 771 } 772 unsafe impl<K: ::windows::runtime::RuntimeType + 'static, V: ::windows::runtime::RuntimeType + 'static> ::windows::runtime::RuntimeType for IObservableMap<K, V> { 773 const SIGNATURE: ::windows::runtime::ConstBuffer = { ::windows::runtime::ConstBuffer::new().push_slice(b"pinterface(").push_slice(b"{65df2bf5-bf39-41b5-aebc-5a9d865e472b}").push_slice(b";").push_other(<K as ::windows::runtime::RuntimeType>::SIGNATURE).push_slice(b";").push_other(<V as ::windows::runtime::RuntimeType>::SIGNATURE).push_slice(b")") }; 774 } 775 impl<K: ::windows::runtime::RuntimeType + 'static, V: ::windows::runtime::RuntimeType + 'static> ::std::convert::From<IObservableMap<K, V>> for ::windows::runtime::IUnknown { from(value: IObservableMap<K, V>) -> Self776 fn from(value: IObservableMap<K, V>) -> Self { 777 unsafe { ::std::mem::transmute(value) } 778 } 779 } 780 impl<K: ::windows::runtime::RuntimeType + 'static, V: ::windows::runtime::RuntimeType + 'static> ::std::convert::From<&IObservableMap<K, V>> for ::windows::runtime::IUnknown { from(value: &IObservableMap<K, V>) -> Self781 fn from(value: &IObservableMap<K, V>) -> Self { 782 ::std::convert::From::from(::std::clone::Clone::clone(value)) 783 } 784 } 785 impl<'a, K: ::windows::runtime::RuntimeType + 'static, V: ::windows::runtime::RuntimeType + 'static> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for IObservableMap<K, V> { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown>786 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> { 787 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(self)) 788 } 789 } 790 impl<'a, K: ::windows::runtime::RuntimeType + 'static, V: ::windows::runtime::RuntimeType + 'static> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for &IObservableMap<K, V> { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown>791 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> { 792 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(::std::clone::Clone::clone(self))) 793 } 794 } 795 impl<K: ::windows::runtime::RuntimeType + 'static, V: ::windows::runtime::RuntimeType + 'static> ::std::convert::From<IObservableMap<K, V>> for ::windows::runtime::IInspectable { from(value: IObservableMap<K, V>) -> Self796 fn from(value: IObservableMap<K, V>) -> Self { 797 value.0 798 } 799 } 800 impl<K: ::windows::runtime::RuntimeType + 'static, V: ::windows::runtime::RuntimeType + 'static> ::std::convert::From<&IObservableMap<K, V>> for ::windows::runtime::IInspectable { from(value: &IObservableMap<K, V>) -> Self801 fn from(value: &IObservableMap<K, V>) -> Self { 802 value.0.clone() 803 } 804 } 805 impl<'a, K: ::windows::runtime::RuntimeType + 'static, V: ::windows::runtime::RuntimeType + 'static> ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable> for IObservableMap<K, V> { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable>806 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable> { 807 ::windows::runtime::Param::Owned(self.0) 808 } 809 } 810 impl<'a, K: ::windows::runtime::RuntimeType + 'static, V: ::windows::runtime::RuntimeType + 'static> ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable> for &'a IObservableMap<K, V> { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable>811 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable> { 812 ::windows::runtime::Param::Borrowed(&self.0) 813 } 814 } 815 impl<K: ::windows::runtime::RuntimeType + 'static, V: ::windows::runtime::RuntimeType + 'static> ::std::convert::TryFrom<IObservableMap<K, V>> for IIterable<IKeyValuePair<K, V>> { 816 type Error = ::windows::runtime::Error; try_from(value: IObservableMap<K, V>) -> ::windows::runtime::Result<Self>817 fn try_from(value: IObservableMap<K, V>) -> ::windows::runtime::Result<Self> { 818 ::std::convert::TryFrom::try_from(&value) 819 } 820 } 821 impl<K: ::windows::runtime::RuntimeType + 'static, V: ::windows::runtime::RuntimeType + 'static> ::std::convert::TryFrom<&IObservableMap<K, V>> for IIterable<IKeyValuePair<K, V>> { 822 type Error = ::windows::runtime::Error; try_from(value: &IObservableMap<K, V>) -> ::windows::runtime::Result<Self>823 fn try_from(value: &IObservableMap<K, V>) -> ::windows::runtime::Result<Self> { 824 ::windows::runtime::Interface::cast(value) 825 } 826 } 827 impl<'a, K: ::windows::runtime::RuntimeType + 'static, V: ::windows::runtime::RuntimeType + 'static> ::windows::runtime::IntoParam<'a, IIterable<IKeyValuePair<K, V>>> for IObservableMap<K, V> { into_param(self) -> ::windows::runtime::Param<'a, IIterable<IKeyValuePair<K, V>>>828 fn into_param(self) -> ::windows::runtime::Param<'a, IIterable<IKeyValuePair<K, V>>> { 829 ::windows::runtime::IntoParam::into_param(&self) 830 } 831 } 832 impl<'a, K: ::windows::runtime::RuntimeType + 'static, V: ::windows::runtime::RuntimeType + 'static> ::windows::runtime::IntoParam<'a, IIterable<IKeyValuePair<K, V>>> for &IObservableMap<K, V> { into_param(self) -> ::windows::runtime::Param<'a, IIterable<IKeyValuePair<K, V>>>833 fn into_param(self) -> ::windows::runtime::Param<'a, IIterable<IKeyValuePair<K, V>>> { 834 ::std::convert::TryInto::<IIterable<IKeyValuePair<K, V>>>::try_into(self).map(::windows::runtime::Param::Owned).unwrap_or(::windows::runtime::Param::None) 835 } 836 } 837 impl<K: ::windows::runtime::RuntimeType + 'static, V: ::windows::runtime::RuntimeType + 'static> ::std::convert::TryFrom<IObservableMap<K, V>> for IMap<K, V> { 838 type Error = ::windows::runtime::Error; try_from(value: IObservableMap<K, V>) -> ::windows::runtime::Result<Self>839 fn try_from(value: IObservableMap<K, V>) -> ::windows::runtime::Result<Self> { 840 ::std::convert::TryFrom::try_from(&value) 841 } 842 } 843 impl<K: ::windows::runtime::RuntimeType + 'static, V: ::windows::runtime::RuntimeType + 'static> ::std::convert::TryFrom<&IObservableMap<K, V>> for IMap<K, V> { 844 type Error = ::windows::runtime::Error; try_from(value: &IObservableMap<K, V>) -> ::windows::runtime::Result<Self>845 fn try_from(value: &IObservableMap<K, V>) -> ::windows::runtime::Result<Self> { 846 ::windows::runtime::Interface::cast(value) 847 } 848 } 849 impl<'a, K: ::windows::runtime::RuntimeType + 'static, V: ::windows::runtime::RuntimeType + 'static> ::windows::runtime::IntoParam<'a, IMap<K, V>> for IObservableMap<K, V> { into_param(self) -> ::windows::runtime::Param<'a, IMap<K, V>>850 fn into_param(self) -> ::windows::runtime::Param<'a, IMap<K, V>> { 851 ::windows::runtime::IntoParam::into_param(&self) 852 } 853 } 854 impl<'a, K: ::windows::runtime::RuntimeType + 'static, V: ::windows::runtime::RuntimeType + 'static> ::windows::runtime::IntoParam<'a, IMap<K, V>> for &IObservableMap<K, V> { into_param(self) -> ::windows::runtime::Param<'a, IMap<K, V>>855 fn into_param(self) -> ::windows::runtime::Param<'a, IMap<K, V>> { 856 ::std::convert::TryInto::<IMap<K, V>>::try_into(self).map(::windows::runtime::Param::Owned).unwrap_or(::windows::runtime::Param::None) 857 } 858 } 859 #[cfg(all(feature = "Foundation_Collections"))] 860 impl<K: ::windows::runtime::RuntimeType + 'static, V: ::windows::runtime::RuntimeType + 'static> ::std::iter::IntoIterator for IObservableMap<K, V> { 861 type Item = IKeyValuePair<K, V>; 862 type IntoIter = IIterator<Self::Item>; into_iter(self) -> Self::IntoIter863 fn into_iter(self) -> Self::IntoIter { 864 ::std::iter::IntoIterator::into_iter(&self) 865 } 866 } 867 #[cfg(all(feature = "Foundation_Collections"))] 868 impl<K: ::windows::runtime::RuntimeType + 'static, V: ::windows::runtime::RuntimeType + 'static> ::std::iter::IntoIterator for &IObservableMap<K, V> { 869 type Item = IKeyValuePair<K, V>; 870 type IntoIter = IIterator<Self::Item>; into_iter(self) -> Self::IntoIter871 fn into_iter(self) -> Self::IntoIter { 872 self.First().unwrap() 873 } 874 } 875 #[repr(C)] 876 #[doc(hidden)] 877 pub struct IObservableMap_abi<K, V>( 878 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, iid: &::windows::runtime::GUID, interface: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 879 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32, 880 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32, 881 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, count: *mut u32, values: *mut *mut ::windows::runtime::GUID) -> ::windows::runtime::HRESULT, 882 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 883 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut i32) -> ::windows::runtime::HRESULT, 884 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, vhnd: ::windows::runtime::RawPtr, result__: *mut super::EventRegistrationToken) -> ::windows::runtime::HRESULT, 885 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, token: super::EventRegistrationToken) -> ::windows::runtime::HRESULT, 886 pub ::std::marker::PhantomData<K>, 887 pub ::std::marker::PhantomData<V>, 888 ) 889 where 890 K: ::windows::runtime::RuntimeType + 'static, 891 V: ::windows::runtime::RuntimeType + 'static; 892 #[repr(transparent)] 893 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: clone :: Clone, :: std :: fmt :: Debug)] 894 pub struct IObservableVector<T>(::windows::runtime::IInspectable, ::std::marker::PhantomData<T>) 895 where 896 T: ::windows::runtime::RuntimeType + 'static; 897 unsafe impl<T: ::windows::runtime::RuntimeType + 'static> ::windows::runtime::Interface for IObservableVector<T> { 898 type Vtable = IObservableVector_abi<T>; 899 const IID: ::windows::runtime::GUID = ::windows::runtime::GUID::from_signature(<IObservableVector<T> as ::windows::runtime::RuntimeType>::SIGNATURE); 900 } 901 impl<T: ::windows::runtime::RuntimeType + 'static> IObservableVector<T> { VectorChanged<'a, Param0: ::windows::runtime::IntoParam<'a, VectorChangedEventHandler<T>>>(&self, vhnd: Param0) -> ::windows::runtime::Result<super::EventRegistrationToken>902 pub fn VectorChanged<'a, Param0: ::windows::runtime::IntoParam<'a, VectorChangedEventHandler<T>>>(&self, vhnd: Param0) -> ::windows::runtime::Result<super::EventRegistrationToken> { 903 let this = self; 904 unsafe { 905 let mut result__: super::EventRegistrationToken = ::std::mem::zeroed(); 906 (::windows::runtime::Interface::vtable(this).6)(::std::mem::transmute_copy(this), vhnd.into_param().abi(), &mut result__).from_abi::<super::EventRegistrationToken>(result__) 907 } 908 } RemoveVectorChanged<'a, Param0: ::windows::runtime::IntoParam<'a, super::EventRegistrationToken>>(&self, token: Param0) -> ::windows::runtime::Result<()>909 pub fn RemoveVectorChanged<'a, Param0: ::windows::runtime::IntoParam<'a, super::EventRegistrationToken>>(&self, token: Param0) -> ::windows::runtime::Result<()> { 910 let this = self; 911 unsafe { (::windows::runtime::Interface::vtable(this).7)(::std::mem::transmute_copy(this), token.into_param().abi()).ok() } 912 } First(&self) -> ::windows::runtime::Result<IIterator<T>>913 pub fn First(&self) -> ::windows::runtime::Result<IIterator<T>> { 914 let this = &::windows::runtime::Interface::cast::<IIterable<T>>(self)?; 915 unsafe { 916 let mut result__: ::windows::runtime::RawPtr = ::std::mem::zeroed(); 917 (::windows::runtime::Interface::vtable(this).6)(::std::mem::transmute_copy(this), &mut result__).from_abi::<IIterator<T>>(result__) 918 } 919 } GetAt(&self, index: u32) -> ::windows::runtime::Result<T>920 pub fn GetAt(&self, index: u32) -> ::windows::runtime::Result<T> { 921 let this = &::windows::runtime::Interface::cast::<IVector<T>>(self)?; 922 unsafe { 923 let mut result__: <T as ::windows::runtime::Abi>::Abi = ::std::mem::zeroed(); 924 (::windows::runtime::Interface::vtable(this).6)(::std::mem::transmute_copy(this), index, &mut result__).from_abi::<T>(result__) 925 } 926 } Size(&self) -> ::windows::runtime::Result<u32>927 pub fn Size(&self) -> ::windows::runtime::Result<u32> { 928 let this = &::windows::runtime::Interface::cast::<IVector<T>>(self)?; 929 unsafe { 930 let mut result__: u32 = ::std::mem::zeroed(); 931 (::windows::runtime::Interface::vtable(this).7)(::std::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) 932 } 933 } GetView(&self) -> ::windows::runtime::Result<IVectorView<T>>934 pub fn GetView(&self) -> ::windows::runtime::Result<IVectorView<T>> { 935 let this = &::windows::runtime::Interface::cast::<IVector<T>>(self)?; 936 unsafe { 937 let mut result__: ::windows::runtime::RawPtr = ::std::mem::zeroed(); 938 (::windows::runtime::Interface::vtable(this).8)(::std::mem::transmute_copy(this), &mut result__).from_abi::<IVectorView<T>>(result__) 939 } 940 } IndexOf<'a, Param0: ::windows::runtime::IntoParam<'a, T>>(&self, value: Param0, index: &mut u32) -> ::windows::runtime::Result<bool>941 pub fn IndexOf<'a, Param0: ::windows::runtime::IntoParam<'a, T>>(&self, value: Param0, index: &mut u32) -> ::windows::runtime::Result<bool> { 942 let this = &::windows::runtime::Interface::cast::<IVector<T>>(self)?; 943 unsafe { 944 let mut result__: bool = ::std::mem::zeroed(); 945 (::windows::runtime::Interface::vtable(this).9)(::std::mem::transmute_copy(this), value.into_param().abi(), index, &mut result__).from_abi::<bool>(result__) 946 } 947 } SetAt<'a, Param1: ::windows::runtime::IntoParam<'a, T>>(&self, index: u32, value: Param1) -> ::windows::runtime::Result<()>948 pub fn SetAt<'a, Param1: ::windows::runtime::IntoParam<'a, T>>(&self, index: u32, value: Param1) -> ::windows::runtime::Result<()> { 949 let this = &::windows::runtime::Interface::cast::<IVector<T>>(self)?; 950 unsafe { (::windows::runtime::Interface::vtable(this).10)(::std::mem::transmute_copy(this), index, value.into_param().abi()).ok() } 951 } InsertAt<'a, Param1: ::windows::runtime::IntoParam<'a, T>>(&self, index: u32, value: Param1) -> ::windows::runtime::Result<()>952 pub fn InsertAt<'a, Param1: ::windows::runtime::IntoParam<'a, T>>(&self, index: u32, value: Param1) -> ::windows::runtime::Result<()> { 953 let this = &::windows::runtime::Interface::cast::<IVector<T>>(self)?; 954 unsafe { (::windows::runtime::Interface::vtable(this).11)(::std::mem::transmute_copy(this), index, value.into_param().abi()).ok() } 955 } RemoveAt(&self, index: u32) -> ::windows::runtime::Result<()>956 pub fn RemoveAt(&self, index: u32) -> ::windows::runtime::Result<()> { 957 let this = &::windows::runtime::Interface::cast::<IVector<T>>(self)?; 958 unsafe { (::windows::runtime::Interface::vtable(this).12)(::std::mem::transmute_copy(this), index).ok() } 959 } Append<'a, Param0: ::windows::runtime::IntoParam<'a, T>>(&self, value: Param0) -> ::windows::runtime::Result<()>960 pub fn Append<'a, Param0: ::windows::runtime::IntoParam<'a, T>>(&self, value: Param0) -> ::windows::runtime::Result<()> { 961 let this = &::windows::runtime::Interface::cast::<IVector<T>>(self)?; 962 unsafe { (::windows::runtime::Interface::vtable(this).13)(::std::mem::transmute_copy(this), value.into_param().abi()).ok() } 963 } RemoveAtEnd(&self) -> ::windows::runtime::Result<()>964 pub fn RemoveAtEnd(&self) -> ::windows::runtime::Result<()> { 965 let this = &::windows::runtime::Interface::cast::<IVector<T>>(self)?; 966 unsafe { (::windows::runtime::Interface::vtable(this).14)(::std::mem::transmute_copy(this)).ok() } 967 } Clear(&self) -> ::windows::runtime::Result<()>968 pub fn Clear(&self) -> ::windows::runtime::Result<()> { 969 let this = &::windows::runtime::Interface::cast::<IVector<T>>(self)?; 970 unsafe { (::windows::runtime::Interface::vtable(this).15)(::std::mem::transmute_copy(this)).ok() } 971 } GetMany(&self, startindex: u32, items: &mut [<T as ::windows::runtime::Abi>::DefaultType]) -> ::windows::runtime::Result<u32>972 pub fn GetMany(&self, startindex: u32, items: &mut [<T as ::windows::runtime::Abi>::DefaultType]) -> ::windows::runtime::Result<u32> { 973 let this = &::windows::runtime::Interface::cast::<IVector<T>>(self)?; 974 unsafe { 975 let mut result__: u32 = ::std::mem::zeroed(); 976 (::windows::runtime::Interface::vtable(this).16)(::std::mem::transmute_copy(this), startindex, items.len() as u32, ::std::mem::transmute_copy(&items), &mut result__).from_abi::<u32>(result__) 977 } 978 } ReplaceAll(&self, items: &[<T as ::windows::runtime::Abi>::DefaultType]) -> ::windows::runtime::Result<()>979 pub fn ReplaceAll(&self, items: &[<T as ::windows::runtime::Abi>::DefaultType]) -> ::windows::runtime::Result<()> { 980 let this = &::windows::runtime::Interface::cast::<IVector<T>>(self)?; 981 unsafe { (::windows::runtime::Interface::vtable(this).17)(::std::mem::transmute_copy(this), items.len() as u32, ::std::mem::transmute(items.as_ptr())).ok() } 982 } 983 } 984 unsafe impl<T: ::windows::runtime::RuntimeType + 'static> ::windows::runtime::RuntimeType for IObservableVector<T> { 985 const SIGNATURE: ::windows::runtime::ConstBuffer = { ::windows::runtime::ConstBuffer::new().push_slice(b"pinterface(").push_slice(b"{5917eb53-50b4-4a0d-b309-65862b3f1dbc}").push_slice(b";").push_other(<T as ::windows::runtime::RuntimeType>::SIGNATURE).push_slice(b")") }; 986 } 987 impl<T: ::windows::runtime::RuntimeType + 'static> ::std::convert::From<IObservableVector<T>> for ::windows::runtime::IUnknown { from(value: IObservableVector<T>) -> Self988 fn from(value: IObservableVector<T>) -> Self { 989 unsafe { ::std::mem::transmute(value) } 990 } 991 } 992 impl<T: ::windows::runtime::RuntimeType + 'static> ::std::convert::From<&IObservableVector<T>> for ::windows::runtime::IUnknown { from(value: &IObservableVector<T>) -> Self993 fn from(value: &IObservableVector<T>) -> Self { 994 ::std::convert::From::from(::std::clone::Clone::clone(value)) 995 } 996 } 997 impl<'a, T: ::windows::runtime::RuntimeType + 'static> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for IObservableVector<T> { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown>998 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> { 999 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(self)) 1000 } 1001 } 1002 impl<'a, T: ::windows::runtime::RuntimeType + 'static> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for &IObservableVector<T> { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown>1003 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> { 1004 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(::std::clone::Clone::clone(self))) 1005 } 1006 } 1007 impl<T: ::windows::runtime::RuntimeType + 'static> ::std::convert::From<IObservableVector<T>> for ::windows::runtime::IInspectable { from(value: IObservableVector<T>) -> Self1008 fn from(value: IObservableVector<T>) -> Self { 1009 value.0 1010 } 1011 } 1012 impl<T: ::windows::runtime::RuntimeType + 'static> ::std::convert::From<&IObservableVector<T>> for ::windows::runtime::IInspectable { from(value: &IObservableVector<T>) -> Self1013 fn from(value: &IObservableVector<T>) -> Self { 1014 value.0.clone() 1015 } 1016 } 1017 impl<'a, T: ::windows::runtime::RuntimeType + 'static> ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable> for IObservableVector<T> { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable>1018 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable> { 1019 ::windows::runtime::Param::Owned(self.0) 1020 } 1021 } 1022 impl<'a, T: ::windows::runtime::RuntimeType + 'static> ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable> for &'a IObservableVector<T> { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable>1023 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable> { 1024 ::windows::runtime::Param::Borrowed(&self.0) 1025 } 1026 } 1027 impl<T: ::windows::runtime::RuntimeType + 'static> ::std::convert::TryFrom<IObservableVector<T>> for IIterable<T> { 1028 type Error = ::windows::runtime::Error; try_from(value: IObservableVector<T>) -> ::windows::runtime::Result<Self>1029 fn try_from(value: IObservableVector<T>) -> ::windows::runtime::Result<Self> { 1030 ::std::convert::TryFrom::try_from(&value) 1031 } 1032 } 1033 impl<T: ::windows::runtime::RuntimeType + 'static> ::std::convert::TryFrom<&IObservableVector<T>> for IIterable<T> { 1034 type Error = ::windows::runtime::Error; try_from(value: &IObservableVector<T>) -> ::windows::runtime::Result<Self>1035 fn try_from(value: &IObservableVector<T>) -> ::windows::runtime::Result<Self> { 1036 ::windows::runtime::Interface::cast(value) 1037 } 1038 } 1039 impl<'a, T: ::windows::runtime::RuntimeType + 'static> ::windows::runtime::IntoParam<'a, IIterable<T>> for IObservableVector<T> { into_param(self) -> ::windows::runtime::Param<'a, IIterable<T>>1040 fn into_param(self) -> ::windows::runtime::Param<'a, IIterable<T>> { 1041 ::windows::runtime::IntoParam::into_param(&self) 1042 } 1043 } 1044 impl<'a, T: ::windows::runtime::RuntimeType + 'static> ::windows::runtime::IntoParam<'a, IIterable<T>> for &IObservableVector<T> { into_param(self) -> ::windows::runtime::Param<'a, IIterable<T>>1045 fn into_param(self) -> ::windows::runtime::Param<'a, IIterable<T>> { 1046 ::std::convert::TryInto::<IIterable<T>>::try_into(self).map(::windows::runtime::Param::Owned).unwrap_or(::windows::runtime::Param::None) 1047 } 1048 } 1049 impl<T: ::windows::runtime::RuntimeType + 'static> ::std::convert::TryFrom<IObservableVector<T>> for IVector<T> { 1050 type Error = ::windows::runtime::Error; try_from(value: IObservableVector<T>) -> ::windows::runtime::Result<Self>1051 fn try_from(value: IObservableVector<T>) -> ::windows::runtime::Result<Self> { 1052 ::std::convert::TryFrom::try_from(&value) 1053 } 1054 } 1055 impl<T: ::windows::runtime::RuntimeType + 'static> ::std::convert::TryFrom<&IObservableVector<T>> for IVector<T> { 1056 type Error = ::windows::runtime::Error; try_from(value: &IObservableVector<T>) -> ::windows::runtime::Result<Self>1057 fn try_from(value: &IObservableVector<T>) -> ::windows::runtime::Result<Self> { 1058 ::windows::runtime::Interface::cast(value) 1059 } 1060 } 1061 impl<'a, T: ::windows::runtime::RuntimeType + 'static> ::windows::runtime::IntoParam<'a, IVector<T>> for IObservableVector<T> { into_param(self) -> ::windows::runtime::Param<'a, IVector<T>>1062 fn into_param(self) -> ::windows::runtime::Param<'a, IVector<T>> { 1063 ::windows::runtime::IntoParam::into_param(&self) 1064 } 1065 } 1066 impl<'a, T: ::windows::runtime::RuntimeType + 'static> ::windows::runtime::IntoParam<'a, IVector<T>> for &IObservableVector<T> { into_param(self) -> ::windows::runtime::Param<'a, IVector<T>>1067 fn into_param(self) -> ::windows::runtime::Param<'a, IVector<T>> { 1068 ::std::convert::TryInto::<IVector<T>>::try_into(self).map(::windows::runtime::Param::Owned).unwrap_or(::windows::runtime::Param::None) 1069 } 1070 } 1071 #[cfg(all(feature = "Foundation_Collections"))] 1072 impl<T: ::windows::runtime::RuntimeType + 'static> ::std::iter::IntoIterator for IObservableVector<T> { 1073 type Item = T; 1074 type IntoIter = VectorIterator<Self::Item>; into_iter(self) -> Self::IntoIter1075 fn into_iter(self) -> Self::IntoIter { 1076 ::std::iter::IntoIterator::into_iter(&self) 1077 } 1078 } 1079 #[cfg(all(feature = "Foundation_Collections"))] 1080 impl<T: ::windows::runtime::RuntimeType + 'static> ::std::iter::IntoIterator for &IObservableVector<T> { 1081 type Item = T; 1082 type IntoIter = VectorIterator<Self::Item>; into_iter(self) -> Self::IntoIter1083 fn into_iter(self) -> Self::IntoIter { 1084 VectorIterator::new(::std::convert::TryInto::try_into(self).ok()) 1085 } 1086 } 1087 #[repr(C)] 1088 #[doc(hidden)] 1089 pub struct IObservableVector_abi<T>( 1090 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, iid: &::windows::runtime::GUID, interface: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 1091 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32, 1092 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32, 1093 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, count: *mut u32, values: *mut *mut ::windows::runtime::GUID) -> ::windows::runtime::HRESULT, 1094 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 1095 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut i32) -> ::windows::runtime::HRESULT, 1096 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, vhnd: ::windows::runtime::RawPtr, result__: *mut super::EventRegistrationToken) -> ::windows::runtime::HRESULT, 1097 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, token: super::EventRegistrationToken) -> ::windows::runtime::HRESULT, 1098 pub ::std::marker::PhantomData<T>, 1099 ) 1100 where 1101 T: ::windows::runtime::RuntimeType + 'static; 1102 #[repr(transparent)] 1103 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: clone :: Clone, :: std :: fmt :: Debug)] 1104 pub struct IPropertySet(::windows::runtime::IInspectable); 1105 unsafe impl ::windows::runtime::Interface for IPropertySet { 1106 type Vtable = IPropertySet_abi; 1107 const IID: ::windows::runtime::GUID = ::windows::runtime::GUID::from_values(2319707551, 62694, 17441, [172, 249, 29, 171, 41, 134, 130, 12]); 1108 } 1109 impl IPropertySet { First(&self) -> ::windows::runtime::Result<IIterator<IKeyValuePair<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>>1110 pub fn First(&self) -> ::windows::runtime::Result<IIterator<IKeyValuePair<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>> { 1111 let this = &::windows::runtime::Interface::cast::<IIterable<IKeyValuePair<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>>(self)?; 1112 unsafe { 1113 let mut result__: ::windows::runtime::RawPtr = ::std::mem::zeroed(); 1114 (::windows::runtime::Interface::vtable(this).6)(::std::mem::transmute_copy(this), &mut result__).from_abi::<IIterator<IKeyValuePair<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>>(result__) 1115 } 1116 } Lookup<'a, Param0: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>>(&self, key: Param0) -> ::windows::runtime::Result<::windows::runtime::IInspectable>1117 pub fn Lookup<'a, Param0: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>>(&self, key: Param0) -> ::windows::runtime::Result<::windows::runtime::IInspectable> { 1118 let this = &::windows::runtime::Interface::cast::<IMap<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>(self)?; 1119 unsafe { 1120 let mut result__: ::windows::runtime::RawPtr = ::std::mem::zeroed(); 1121 (::windows::runtime::Interface::vtable(this).6)(::std::mem::transmute_copy(this), key.into_param().abi(), &mut result__).from_abi::<::windows::runtime::IInspectable>(result__) 1122 } 1123 } Size(&self) -> ::windows::runtime::Result<u32>1124 pub fn Size(&self) -> ::windows::runtime::Result<u32> { 1125 let this = &::windows::runtime::Interface::cast::<IMap<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>(self)?; 1126 unsafe { 1127 let mut result__: u32 = ::std::mem::zeroed(); 1128 (::windows::runtime::Interface::vtable(this).7)(::std::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) 1129 } 1130 } HasKey<'a, Param0: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>>(&self, key: Param0) -> ::windows::runtime::Result<bool>1131 pub fn HasKey<'a, Param0: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>>(&self, key: Param0) -> ::windows::runtime::Result<bool> { 1132 let this = &::windows::runtime::Interface::cast::<IMap<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>(self)?; 1133 unsafe { 1134 let mut result__: bool = ::std::mem::zeroed(); 1135 (::windows::runtime::Interface::vtable(this).8)(::std::mem::transmute_copy(this), key.into_param().abi(), &mut result__).from_abi::<bool>(result__) 1136 } 1137 } GetView(&self) -> ::windows::runtime::Result<IMapView<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>1138 pub fn GetView(&self) -> ::windows::runtime::Result<IMapView<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>> { 1139 let this = &::windows::runtime::Interface::cast::<IMap<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>(self)?; 1140 unsafe { 1141 let mut result__: ::windows::runtime::RawPtr = ::std::mem::zeroed(); 1142 (::windows::runtime::Interface::vtable(this).9)(::std::mem::transmute_copy(this), &mut result__).from_abi::<IMapView<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>(result__) 1143 } 1144 } Insert<'a, Param0: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>, Param1: ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable>>(&self, key: Param0, value: Param1) -> ::windows::runtime::Result<bool>1145 pub fn Insert<'a, Param0: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>, Param1: ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable>>(&self, key: Param0, value: Param1) -> ::windows::runtime::Result<bool> { 1146 let this = &::windows::runtime::Interface::cast::<IMap<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>(self)?; 1147 unsafe { 1148 let mut result__: bool = ::std::mem::zeroed(); 1149 (::windows::runtime::Interface::vtable(this).10)(::std::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi(), &mut result__).from_abi::<bool>(result__) 1150 } 1151 } Remove<'a, Param0: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>>(&self, key: Param0) -> ::windows::runtime::Result<()>1152 pub fn Remove<'a, Param0: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>>(&self, key: Param0) -> ::windows::runtime::Result<()> { 1153 let this = &::windows::runtime::Interface::cast::<IMap<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>(self)?; 1154 unsafe { (::windows::runtime::Interface::vtable(this).11)(::std::mem::transmute_copy(this), key.into_param().abi()).ok() } 1155 } Clear(&self) -> ::windows::runtime::Result<()>1156 pub fn Clear(&self) -> ::windows::runtime::Result<()> { 1157 let this = &::windows::runtime::Interface::cast::<IMap<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>(self)?; 1158 unsafe { (::windows::runtime::Interface::vtable(this).12)(::std::mem::transmute_copy(this)).ok() } 1159 } MapChanged<'a, Param0: ::windows::runtime::IntoParam<'a, MapChangedEventHandler<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>>(&self, vhnd: Param0) -> ::windows::runtime::Result<super::EventRegistrationToken>1160 pub fn MapChanged<'a, Param0: ::windows::runtime::IntoParam<'a, MapChangedEventHandler<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>>(&self, vhnd: Param0) -> ::windows::runtime::Result<super::EventRegistrationToken> { 1161 let this = &::windows::runtime::Interface::cast::<IObservableMap<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>(self)?; 1162 unsafe { 1163 let mut result__: super::EventRegistrationToken = ::std::mem::zeroed(); 1164 (::windows::runtime::Interface::vtable(this).6)(::std::mem::transmute_copy(this), vhnd.into_param().abi(), &mut result__).from_abi::<super::EventRegistrationToken>(result__) 1165 } 1166 } RemoveMapChanged<'a, Param0: ::windows::runtime::IntoParam<'a, super::EventRegistrationToken>>(&self, token: Param0) -> ::windows::runtime::Result<()>1167 pub fn RemoveMapChanged<'a, Param0: ::windows::runtime::IntoParam<'a, super::EventRegistrationToken>>(&self, token: Param0) -> ::windows::runtime::Result<()> { 1168 let this = &::windows::runtime::Interface::cast::<IObservableMap<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>(self)?; 1169 unsafe { (::windows::runtime::Interface::vtable(this).7)(::std::mem::transmute_copy(this), token.into_param().abi()).ok() } 1170 } 1171 } 1172 unsafe impl ::windows::runtime::RuntimeType for IPropertySet { 1173 const SIGNATURE: ::windows::runtime::ConstBuffer = ::windows::runtime::ConstBuffer::from_slice(b"{8a43ed9f-f4e6-4421-acf9-1dab2986820c}"); 1174 } 1175 impl ::std::convert::From<IPropertySet> for ::windows::runtime::IUnknown { from(value: IPropertySet) -> Self1176 fn from(value: IPropertySet) -> Self { 1177 unsafe { ::std::mem::transmute(value) } 1178 } 1179 } 1180 impl ::std::convert::From<&IPropertySet> for ::windows::runtime::IUnknown { from(value: &IPropertySet) -> Self1181 fn from(value: &IPropertySet) -> Self { 1182 ::std::convert::From::from(::std::clone::Clone::clone(value)) 1183 } 1184 } 1185 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for IPropertySet { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown>1186 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> { 1187 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(self)) 1188 } 1189 } 1190 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for &IPropertySet { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown>1191 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> { 1192 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(::std::clone::Clone::clone(self))) 1193 } 1194 } 1195 impl ::std::convert::From<IPropertySet> for ::windows::runtime::IInspectable { from(value: IPropertySet) -> Self1196 fn from(value: IPropertySet) -> Self { 1197 value.0 1198 } 1199 } 1200 impl ::std::convert::From<&IPropertySet> for ::windows::runtime::IInspectable { from(value: &IPropertySet) -> Self1201 fn from(value: &IPropertySet) -> Self { 1202 value.0.clone() 1203 } 1204 } 1205 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable> for IPropertySet { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable>1206 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable> { 1207 ::windows::runtime::Param::Owned(self.0) 1208 } 1209 } 1210 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable> for &'a IPropertySet { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable>1211 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable> { 1212 ::windows::runtime::Param::Borrowed(&self.0) 1213 } 1214 } 1215 impl ::std::convert::TryFrom<IPropertySet> for IIterable<IKeyValuePair<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>> { 1216 type Error = ::windows::runtime::Error; try_from(value: IPropertySet) -> ::windows::runtime::Result<Self>1217 fn try_from(value: IPropertySet) -> ::windows::runtime::Result<Self> { 1218 ::std::convert::TryFrom::try_from(&value) 1219 } 1220 } 1221 impl ::std::convert::TryFrom<&IPropertySet> for IIterable<IKeyValuePair<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>> { 1222 type Error = ::windows::runtime::Error; try_from(value: &IPropertySet) -> ::windows::runtime::Result<Self>1223 fn try_from(value: &IPropertySet) -> ::windows::runtime::Result<Self> { 1224 ::windows::runtime::Interface::cast(value) 1225 } 1226 } 1227 impl<'a> ::windows::runtime::IntoParam<'a, IIterable<IKeyValuePair<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>> for IPropertySet { into_param(self) -> ::windows::runtime::Param<'a, IIterable<IKeyValuePair<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>>1228 fn into_param(self) -> ::windows::runtime::Param<'a, IIterable<IKeyValuePair<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>> { 1229 ::windows::runtime::IntoParam::into_param(&self) 1230 } 1231 } 1232 impl<'a> ::windows::runtime::IntoParam<'a, IIterable<IKeyValuePair<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>> for &IPropertySet { into_param(self) -> ::windows::runtime::Param<'a, IIterable<IKeyValuePair<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>>1233 fn into_param(self) -> ::windows::runtime::Param<'a, IIterable<IKeyValuePair<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>> { 1234 ::std::convert::TryInto::<IIterable<IKeyValuePair<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>>::try_into(self).map(::windows::runtime::Param::Owned).unwrap_or(::windows::runtime::Param::None) 1235 } 1236 } 1237 impl ::std::convert::TryFrom<IPropertySet> for IMap<::windows::runtime::HSTRING, ::windows::runtime::IInspectable> { 1238 type Error = ::windows::runtime::Error; try_from(value: IPropertySet) -> ::windows::runtime::Result<Self>1239 fn try_from(value: IPropertySet) -> ::windows::runtime::Result<Self> { 1240 ::std::convert::TryFrom::try_from(&value) 1241 } 1242 } 1243 impl ::std::convert::TryFrom<&IPropertySet> for IMap<::windows::runtime::HSTRING, ::windows::runtime::IInspectable> { 1244 type Error = ::windows::runtime::Error; try_from(value: &IPropertySet) -> ::windows::runtime::Result<Self>1245 fn try_from(value: &IPropertySet) -> ::windows::runtime::Result<Self> { 1246 ::windows::runtime::Interface::cast(value) 1247 } 1248 } 1249 impl<'a> ::windows::runtime::IntoParam<'a, IMap<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>> for IPropertySet { into_param(self) -> ::windows::runtime::Param<'a, IMap<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>1250 fn into_param(self) -> ::windows::runtime::Param<'a, IMap<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>> { 1251 ::windows::runtime::IntoParam::into_param(&self) 1252 } 1253 } 1254 impl<'a> ::windows::runtime::IntoParam<'a, IMap<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>> for &IPropertySet { into_param(self) -> ::windows::runtime::Param<'a, IMap<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>1255 fn into_param(self) -> ::windows::runtime::Param<'a, IMap<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>> { 1256 ::std::convert::TryInto::<IMap<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>::try_into(self).map(::windows::runtime::Param::Owned).unwrap_or(::windows::runtime::Param::None) 1257 } 1258 } 1259 impl ::std::convert::TryFrom<IPropertySet> for IObservableMap<::windows::runtime::HSTRING, ::windows::runtime::IInspectable> { 1260 type Error = ::windows::runtime::Error; try_from(value: IPropertySet) -> ::windows::runtime::Result<Self>1261 fn try_from(value: IPropertySet) -> ::windows::runtime::Result<Self> { 1262 ::std::convert::TryFrom::try_from(&value) 1263 } 1264 } 1265 impl ::std::convert::TryFrom<&IPropertySet> for IObservableMap<::windows::runtime::HSTRING, ::windows::runtime::IInspectable> { 1266 type Error = ::windows::runtime::Error; try_from(value: &IPropertySet) -> ::windows::runtime::Result<Self>1267 fn try_from(value: &IPropertySet) -> ::windows::runtime::Result<Self> { 1268 ::windows::runtime::Interface::cast(value) 1269 } 1270 } 1271 impl<'a> ::windows::runtime::IntoParam<'a, IObservableMap<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>> for IPropertySet { into_param(self) -> ::windows::runtime::Param<'a, IObservableMap<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>1272 fn into_param(self) -> ::windows::runtime::Param<'a, IObservableMap<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>> { 1273 ::windows::runtime::IntoParam::into_param(&self) 1274 } 1275 } 1276 impl<'a> ::windows::runtime::IntoParam<'a, IObservableMap<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>> for &IPropertySet { into_param(self) -> ::windows::runtime::Param<'a, IObservableMap<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>1277 fn into_param(self) -> ::windows::runtime::Param<'a, IObservableMap<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>> { 1278 ::std::convert::TryInto::<IObservableMap<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>::try_into(self).map(::windows::runtime::Param::Owned).unwrap_or(::windows::runtime::Param::None) 1279 } 1280 } 1281 #[cfg(all(feature = "Foundation_Collections"))] 1282 impl ::std::iter::IntoIterator for IPropertySet { 1283 type Item = IKeyValuePair<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>; 1284 type IntoIter = IIterator<Self::Item>; into_iter(self) -> Self::IntoIter1285 fn into_iter(self) -> Self::IntoIter { 1286 ::std::iter::IntoIterator::into_iter(&self) 1287 } 1288 } 1289 #[cfg(all(feature = "Foundation_Collections"))] 1290 impl ::std::iter::IntoIterator for &IPropertySet { 1291 type Item = IKeyValuePair<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>; 1292 type IntoIter = IIterator<Self::Item>; into_iter(self) -> Self::IntoIter1293 fn into_iter(self) -> Self::IntoIter { 1294 self.First().unwrap() 1295 } 1296 } 1297 #[repr(C)] 1298 #[doc(hidden)] 1299 pub struct IPropertySet_abi( 1300 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, iid: &::windows::runtime::GUID, interface: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 1301 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32, 1302 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32, 1303 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, count: *mut u32, values: *mut *mut ::windows::runtime::GUID) -> ::windows::runtime::HRESULT, 1304 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 1305 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut i32) -> ::windows::runtime::HRESULT, 1306 ); 1307 #[repr(transparent)] 1308 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: clone :: Clone, :: std :: fmt :: Debug)] 1309 pub struct IVector<T>(::windows::runtime::IInspectable, ::std::marker::PhantomData<T>) 1310 where 1311 T: ::windows::runtime::RuntimeType + 'static; 1312 unsafe impl<T: ::windows::runtime::RuntimeType + 'static> ::windows::runtime::Interface for IVector<T> { 1313 type Vtable = IVector_abi<T>; 1314 const IID: ::windows::runtime::GUID = ::windows::runtime::GUID::from_signature(<IVector<T> as ::windows::runtime::RuntimeType>::SIGNATURE); 1315 } 1316 impl<T: ::windows::runtime::RuntimeType + 'static> IVector<T> { GetAt(&self, index: u32) -> ::windows::runtime::Result<T>1317 pub fn GetAt(&self, index: u32) -> ::windows::runtime::Result<T> { 1318 let this = self; 1319 unsafe { 1320 let mut result__: <T as ::windows::runtime::Abi>::Abi = ::std::mem::zeroed(); 1321 (::windows::runtime::Interface::vtable(this).6)(::std::mem::transmute_copy(this), index, &mut result__).from_abi::<T>(result__) 1322 } 1323 } Size(&self) -> ::windows::runtime::Result<u32>1324 pub fn Size(&self) -> ::windows::runtime::Result<u32> { 1325 let this = self; 1326 unsafe { 1327 let mut result__: u32 = ::std::mem::zeroed(); 1328 (::windows::runtime::Interface::vtable(this).7)(::std::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) 1329 } 1330 } GetView(&self) -> ::windows::runtime::Result<IVectorView<T>>1331 pub fn GetView(&self) -> ::windows::runtime::Result<IVectorView<T>> { 1332 let this = self; 1333 unsafe { 1334 let mut result__: ::windows::runtime::RawPtr = ::std::mem::zeroed(); 1335 (::windows::runtime::Interface::vtable(this).8)(::std::mem::transmute_copy(this), &mut result__).from_abi::<IVectorView<T>>(result__) 1336 } 1337 } IndexOf<'a, Param0: ::windows::runtime::IntoParam<'a, T>>(&self, value: Param0, index: &mut u32) -> ::windows::runtime::Result<bool>1338 pub fn IndexOf<'a, Param0: ::windows::runtime::IntoParam<'a, T>>(&self, value: Param0, index: &mut u32) -> ::windows::runtime::Result<bool> { 1339 let this = self; 1340 unsafe { 1341 let mut result__: bool = ::std::mem::zeroed(); 1342 (::windows::runtime::Interface::vtable(this).9)(::std::mem::transmute_copy(this), value.into_param().abi(), index, &mut result__).from_abi::<bool>(result__) 1343 } 1344 } SetAt<'a, Param1: ::windows::runtime::IntoParam<'a, T>>(&self, index: u32, value: Param1) -> ::windows::runtime::Result<()>1345 pub fn SetAt<'a, Param1: ::windows::runtime::IntoParam<'a, T>>(&self, index: u32, value: Param1) -> ::windows::runtime::Result<()> { 1346 let this = self; 1347 unsafe { (::windows::runtime::Interface::vtable(this).10)(::std::mem::transmute_copy(this), index, value.into_param().abi()).ok() } 1348 } InsertAt<'a, Param1: ::windows::runtime::IntoParam<'a, T>>(&self, index: u32, value: Param1) -> ::windows::runtime::Result<()>1349 pub fn InsertAt<'a, Param1: ::windows::runtime::IntoParam<'a, T>>(&self, index: u32, value: Param1) -> ::windows::runtime::Result<()> { 1350 let this = self; 1351 unsafe { (::windows::runtime::Interface::vtable(this).11)(::std::mem::transmute_copy(this), index, value.into_param().abi()).ok() } 1352 } RemoveAt(&self, index: u32) -> ::windows::runtime::Result<()>1353 pub fn RemoveAt(&self, index: u32) -> ::windows::runtime::Result<()> { 1354 let this = self; 1355 unsafe { (::windows::runtime::Interface::vtable(this).12)(::std::mem::transmute_copy(this), index).ok() } 1356 } Append<'a, Param0: ::windows::runtime::IntoParam<'a, T>>(&self, value: Param0) -> ::windows::runtime::Result<()>1357 pub fn Append<'a, Param0: ::windows::runtime::IntoParam<'a, T>>(&self, value: Param0) -> ::windows::runtime::Result<()> { 1358 let this = self; 1359 unsafe { (::windows::runtime::Interface::vtable(this).13)(::std::mem::transmute_copy(this), value.into_param().abi()).ok() } 1360 } RemoveAtEnd(&self) -> ::windows::runtime::Result<()>1361 pub fn RemoveAtEnd(&self) -> ::windows::runtime::Result<()> { 1362 let this = self; 1363 unsafe { (::windows::runtime::Interface::vtable(this).14)(::std::mem::transmute_copy(this)).ok() } 1364 } Clear(&self) -> ::windows::runtime::Result<()>1365 pub fn Clear(&self) -> ::windows::runtime::Result<()> { 1366 let this = self; 1367 unsafe { (::windows::runtime::Interface::vtable(this).15)(::std::mem::transmute_copy(this)).ok() } 1368 } GetMany(&self, startindex: u32, items: &mut [<T as ::windows::runtime::Abi>::DefaultType]) -> ::windows::runtime::Result<u32>1369 pub fn GetMany(&self, startindex: u32, items: &mut [<T as ::windows::runtime::Abi>::DefaultType]) -> ::windows::runtime::Result<u32> { 1370 let this = self; 1371 unsafe { 1372 let mut result__: u32 = ::std::mem::zeroed(); 1373 (::windows::runtime::Interface::vtable(this).16)(::std::mem::transmute_copy(this), startindex, items.len() as u32, ::std::mem::transmute_copy(&items), &mut result__).from_abi::<u32>(result__) 1374 } 1375 } ReplaceAll(&self, items: &[<T as ::windows::runtime::Abi>::DefaultType]) -> ::windows::runtime::Result<()>1376 pub fn ReplaceAll(&self, items: &[<T as ::windows::runtime::Abi>::DefaultType]) -> ::windows::runtime::Result<()> { 1377 let this = self; 1378 unsafe { (::windows::runtime::Interface::vtable(this).17)(::std::mem::transmute_copy(this), items.len() as u32, ::std::mem::transmute(items.as_ptr())).ok() } 1379 } First(&self) -> ::windows::runtime::Result<IIterator<T>>1380 pub fn First(&self) -> ::windows::runtime::Result<IIterator<T>> { 1381 let this = &::windows::runtime::Interface::cast::<IIterable<T>>(self)?; 1382 unsafe { 1383 let mut result__: ::windows::runtime::RawPtr = ::std::mem::zeroed(); 1384 (::windows::runtime::Interface::vtable(this).6)(::std::mem::transmute_copy(this), &mut result__).from_abi::<IIterator<T>>(result__) 1385 } 1386 } 1387 } 1388 unsafe impl<T: ::windows::runtime::RuntimeType + 'static> ::windows::runtime::RuntimeType for IVector<T> { 1389 const SIGNATURE: ::windows::runtime::ConstBuffer = { ::windows::runtime::ConstBuffer::new().push_slice(b"pinterface(").push_slice(b"{913337e9-11a1-4345-a3a2-4e7f956e222d}").push_slice(b";").push_other(<T as ::windows::runtime::RuntimeType>::SIGNATURE).push_slice(b")") }; 1390 } 1391 impl<T: ::windows::runtime::RuntimeType + 'static> ::std::convert::From<IVector<T>> for ::windows::runtime::IUnknown { from(value: IVector<T>) -> Self1392 fn from(value: IVector<T>) -> Self { 1393 unsafe { ::std::mem::transmute(value) } 1394 } 1395 } 1396 impl<T: ::windows::runtime::RuntimeType + 'static> ::std::convert::From<&IVector<T>> for ::windows::runtime::IUnknown { from(value: &IVector<T>) -> Self1397 fn from(value: &IVector<T>) -> Self { 1398 ::std::convert::From::from(::std::clone::Clone::clone(value)) 1399 } 1400 } 1401 impl<'a, T: ::windows::runtime::RuntimeType + 'static> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for IVector<T> { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown>1402 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> { 1403 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(self)) 1404 } 1405 } 1406 impl<'a, T: ::windows::runtime::RuntimeType + 'static> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for &IVector<T> { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown>1407 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> { 1408 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(::std::clone::Clone::clone(self))) 1409 } 1410 } 1411 impl<T: ::windows::runtime::RuntimeType + 'static> ::std::convert::From<IVector<T>> for ::windows::runtime::IInspectable { from(value: IVector<T>) -> Self1412 fn from(value: IVector<T>) -> Self { 1413 value.0 1414 } 1415 } 1416 impl<T: ::windows::runtime::RuntimeType + 'static> ::std::convert::From<&IVector<T>> for ::windows::runtime::IInspectable { from(value: &IVector<T>) -> Self1417 fn from(value: &IVector<T>) -> Self { 1418 value.0.clone() 1419 } 1420 } 1421 impl<'a, T: ::windows::runtime::RuntimeType + 'static> ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable> for IVector<T> { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable>1422 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable> { 1423 ::windows::runtime::Param::Owned(self.0) 1424 } 1425 } 1426 impl<'a, T: ::windows::runtime::RuntimeType + 'static> ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable> for &'a IVector<T> { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable>1427 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable> { 1428 ::windows::runtime::Param::Borrowed(&self.0) 1429 } 1430 } 1431 impl<T: ::windows::runtime::RuntimeType + 'static> ::std::convert::TryFrom<IVector<T>> for IIterable<T> { 1432 type Error = ::windows::runtime::Error; try_from(value: IVector<T>) -> ::windows::runtime::Result<Self>1433 fn try_from(value: IVector<T>) -> ::windows::runtime::Result<Self> { 1434 ::std::convert::TryFrom::try_from(&value) 1435 } 1436 } 1437 impl<T: ::windows::runtime::RuntimeType + 'static> ::std::convert::TryFrom<&IVector<T>> for IIterable<T> { 1438 type Error = ::windows::runtime::Error; try_from(value: &IVector<T>) -> ::windows::runtime::Result<Self>1439 fn try_from(value: &IVector<T>) -> ::windows::runtime::Result<Self> { 1440 ::windows::runtime::Interface::cast(value) 1441 } 1442 } 1443 impl<'a, T: ::windows::runtime::RuntimeType + 'static> ::windows::runtime::IntoParam<'a, IIterable<T>> for IVector<T> { into_param(self) -> ::windows::runtime::Param<'a, IIterable<T>>1444 fn into_param(self) -> ::windows::runtime::Param<'a, IIterable<T>> { 1445 ::windows::runtime::IntoParam::into_param(&self) 1446 } 1447 } 1448 impl<'a, T: ::windows::runtime::RuntimeType + 'static> ::windows::runtime::IntoParam<'a, IIterable<T>> for &IVector<T> { into_param(self) -> ::windows::runtime::Param<'a, IIterable<T>>1449 fn into_param(self) -> ::windows::runtime::Param<'a, IIterable<T>> { 1450 ::std::convert::TryInto::<IIterable<T>>::try_into(self).map(::windows::runtime::Param::Owned).unwrap_or(::windows::runtime::Param::None) 1451 } 1452 } 1453 pub struct VectorIterator<T: ::windows::runtime::RuntimeType + 'static> { 1454 vector: ::std::option::Option<IVector<T>>, 1455 current: u32, 1456 } 1457 impl<T: ::windows::runtime::RuntimeType> VectorIterator<T> { new(vector: ::std::option::Option<IVector<T>>) -> Self1458 pub fn new(vector: ::std::option::Option<IVector<T>>) -> Self { 1459 Self { vector, current: 0 } 1460 } 1461 } 1462 impl<T: ::windows::runtime::RuntimeType> ::std::iter::Iterator for VectorIterator<T> { 1463 type Item = T; next(&mut self) -> ::std::option::Option<Self::Item>1464 fn next(&mut self) -> ::std::option::Option<Self::Item> { 1465 self.vector.as_ref().and_then(|vector| vector.GetAt(self.current).ok()).and_then(|result| { 1466 self.current += 1; 1467 Some(result) 1468 }) 1469 } 1470 } 1471 impl<T: ::windows::runtime::RuntimeType> ::std::iter::IntoIterator for IVector<T> { 1472 type Item = T; 1473 type IntoIter = VectorIterator<Self::Item>; into_iter(self) -> Self::IntoIter1474 fn into_iter(self) -> Self::IntoIter { 1475 ::std::iter::IntoIterator::into_iter(&self) 1476 } 1477 } 1478 impl<T: ::windows::runtime::RuntimeType> ::std::iter::IntoIterator for &IVector<T> { 1479 type Item = T; 1480 type IntoIter = VectorIterator<Self::Item>; into_iter(self) -> Self::IntoIter1481 fn into_iter(self) -> Self::IntoIter { 1482 VectorIterator::new(::std::option::Option::Some(::std::clone::Clone::clone(self))) 1483 } 1484 } 1485 #[repr(C)] 1486 #[doc(hidden)] 1487 pub struct IVector_abi<T>( 1488 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, iid: &::windows::runtime::GUID, interface: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 1489 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32, 1490 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32, 1491 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, count: *mut u32, values: *mut *mut ::windows::runtime::GUID) -> ::windows::runtime::HRESULT, 1492 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 1493 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut i32) -> ::windows::runtime::HRESULT, 1494 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, index: u32, result__: *mut <T as ::windows::runtime::Abi>::Abi) -> ::windows::runtime::HRESULT, 1495 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, result__: *mut u32) -> ::windows::runtime::HRESULT, 1496 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, result__: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 1497 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: <T as ::windows::runtime::Abi>::Abi, index: *mut u32, result__: *mut bool) -> ::windows::runtime::HRESULT, 1498 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, index: u32, value: <T as ::windows::runtime::Abi>::Abi) -> ::windows::runtime::HRESULT, 1499 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, index: u32, value: <T as ::windows::runtime::Abi>::Abi) -> ::windows::runtime::HRESULT, 1500 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, index: u32) -> ::windows::runtime::HRESULT, 1501 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: <T as ::windows::runtime::Abi>::Abi) -> ::windows::runtime::HRESULT, 1502 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 1503 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 1504 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, startindex: u32, items_array_size: u32, items: *mut <T as ::windows::runtime::Abi>::Abi, result__: *mut u32) -> ::windows::runtime::HRESULT, 1505 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, items_array_size: u32, items: *const <T as ::windows::runtime::Abi>::Abi) -> ::windows::runtime::HRESULT, 1506 pub ::std::marker::PhantomData<T>, 1507 ) 1508 where 1509 T: ::windows::runtime::RuntimeType + 'static; 1510 #[repr(transparent)] 1511 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: clone :: Clone, :: std :: fmt :: Debug)] 1512 pub struct IVectorChangedEventArgs(::windows::runtime::IInspectable); 1513 unsafe impl ::windows::runtime::Interface for IVectorChangedEventArgs { 1514 type Vtable = IVectorChangedEventArgs_abi; 1515 const IID: ::windows::runtime::GUID = ::windows::runtime::GUID::from_values(1465463775, 13566, 17536, [175, 21, 7, 105, 31, 61, 93, 155]); 1516 } 1517 impl IVectorChangedEventArgs { CollectionChange(&self) -> ::windows::runtime::Result<CollectionChange>1518 pub fn CollectionChange(&self) -> ::windows::runtime::Result<CollectionChange> { 1519 let this = self; 1520 unsafe { 1521 let mut result__: CollectionChange = ::std::mem::zeroed(); 1522 (::windows::runtime::Interface::vtable(this).6)(::std::mem::transmute_copy(this), &mut result__).from_abi::<CollectionChange>(result__) 1523 } 1524 } Index(&self) -> ::windows::runtime::Result<u32>1525 pub fn Index(&self) -> ::windows::runtime::Result<u32> { 1526 let this = self; 1527 unsafe { 1528 let mut result__: u32 = ::std::mem::zeroed(); 1529 (::windows::runtime::Interface::vtable(this).7)(::std::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) 1530 } 1531 } 1532 } 1533 unsafe impl ::windows::runtime::RuntimeType for IVectorChangedEventArgs { 1534 const SIGNATURE: ::windows::runtime::ConstBuffer = ::windows::runtime::ConstBuffer::from_slice(b"{575933df-34fe-4480-af15-07691f3d5d9b}"); 1535 } 1536 impl ::std::convert::From<IVectorChangedEventArgs> for ::windows::runtime::IUnknown { from(value: IVectorChangedEventArgs) -> Self1537 fn from(value: IVectorChangedEventArgs) -> Self { 1538 unsafe { ::std::mem::transmute(value) } 1539 } 1540 } 1541 impl ::std::convert::From<&IVectorChangedEventArgs> for ::windows::runtime::IUnknown { from(value: &IVectorChangedEventArgs) -> Self1542 fn from(value: &IVectorChangedEventArgs) -> Self { 1543 ::std::convert::From::from(::std::clone::Clone::clone(value)) 1544 } 1545 } 1546 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for IVectorChangedEventArgs { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown>1547 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> { 1548 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(self)) 1549 } 1550 } 1551 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for &IVectorChangedEventArgs { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown>1552 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> { 1553 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(::std::clone::Clone::clone(self))) 1554 } 1555 } 1556 impl ::std::convert::From<IVectorChangedEventArgs> for ::windows::runtime::IInspectable { from(value: IVectorChangedEventArgs) -> Self1557 fn from(value: IVectorChangedEventArgs) -> Self { 1558 value.0 1559 } 1560 } 1561 impl ::std::convert::From<&IVectorChangedEventArgs> for ::windows::runtime::IInspectable { from(value: &IVectorChangedEventArgs) -> Self1562 fn from(value: &IVectorChangedEventArgs) -> Self { 1563 value.0.clone() 1564 } 1565 } 1566 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable> for IVectorChangedEventArgs { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable>1567 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable> { 1568 ::windows::runtime::Param::Owned(self.0) 1569 } 1570 } 1571 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable> for &'a IVectorChangedEventArgs { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable>1572 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable> { 1573 ::windows::runtime::Param::Borrowed(&self.0) 1574 } 1575 } 1576 #[repr(C)] 1577 #[doc(hidden)] 1578 pub struct IVectorChangedEventArgs_abi( 1579 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, iid: &::windows::runtime::GUID, interface: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 1580 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32, 1581 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32, 1582 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, count: *mut u32, values: *mut *mut ::windows::runtime::GUID) -> ::windows::runtime::HRESULT, 1583 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 1584 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut i32) -> ::windows::runtime::HRESULT, 1585 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, result__: *mut CollectionChange) -> ::windows::runtime::HRESULT, 1586 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, result__: *mut u32) -> ::windows::runtime::HRESULT, 1587 ); 1588 #[repr(transparent)] 1589 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: clone :: Clone, :: std :: fmt :: Debug)] 1590 pub struct IVectorView<T>(::windows::runtime::IInspectable, ::std::marker::PhantomData<T>) 1591 where 1592 T: ::windows::runtime::RuntimeType + 'static; 1593 unsafe impl<T: ::windows::runtime::RuntimeType + 'static> ::windows::runtime::Interface for IVectorView<T> { 1594 type Vtable = IVectorView_abi<T>; 1595 const IID: ::windows::runtime::GUID = ::windows::runtime::GUID::from_signature(<IVectorView<T> as ::windows::runtime::RuntimeType>::SIGNATURE); 1596 } 1597 impl<T: ::windows::runtime::RuntimeType + 'static> IVectorView<T> { GetAt(&self, index: u32) -> ::windows::runtime::Result<T>1598 pub fn GetAt(&self, index: u32) -> ::windows::runtime::Result<T> { 1599 let this = self; 1600 unsafe { 1601 let mut result__: <T as ::windows::runtime::Abi>::Abi = ::std::mem::zeroed(); 1602 (::windows::runtime::Interface::vtable(this).6)(::std::mem::transmute_copy(this), index, &mut result__).from_abi::<T>(result__) 1603 } 1604 } Size(&self) -> ::windows::runtime::Result<u32>1605 pub fn Size(&self) -> ::windows::runtime::Result<u32> { 1606 let this = self; 1607 unsafe { 1608 let mut result__: u32 = ::std::mem::zeroed(); 1609 (::windows::runtime::Interface::vtable(this).7)(::std::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) 1610 } 1611 } IndexOf<'a, Param0: ::windows::runtime::IntoParam<'a, T>>(&self, value: Param0, index: &mut u32) -> ::windows::runtime::Result<bool>1612 pub fn IndexOf<'a, Param0: ::windows::runtime::IntoParam<'a, T>>(&self, value: Param0, index: &mut u32) -> ::windows::runtime::Result<bool> { 1613 let this = self; 1614 unsafe { 1615 let mut result__: bool = ::std::mem::zeroed(); 1616 (::windows::runtime::Interface::vtable(this).8)(::std::mem::transmute_copy(this), value.into_param().abi(), index, &mut result__).from_abi::<bool>(result__) 1617 } 1618 } GetMany(&self, startindex: u32, items: &mut [<T as ::windows::runtime::Abi>::DefaultType]) -> ::windows::runtime::Result<u32>1619 pub fn GetMany(&self, startindex: u32, items: &mut [<T as ::windows::runtime::Abi>::DefaultType]) -> ::windows::runtime::Result<u32> { 1620 let this = self; 1621 unsafe { 1622 let mut result__: u32 = ::std::mem::zeroed(); 1623 (::windows::runtime::Interface::vtable(this).9)(::std::mem::transmute_copy(this), startindex, items.len() as u32, ::std::mem::transmute_copy(&items), &mut result__).from_abi::<u32>(result__) 1624 } 1625 } First(&self) -> ::windows::runtime::Result<IIterator<T>>1626 pub fn First(&self) -> ::windows::runtime::Result<IIterator<T>> { 1627 let this = &::windows::runtime::Interface::cast::<IIterable<T>>(self)?; 1628 unsafe { 1629 let mut result__: ::windows::runtime::RawPtr = ::std::mem::zeroed(); 1630 (::windows::runtime::Interface::vtable(this).6)(::std::mem::transmute_copy(this), &mut result__).from_abi::<IIterator<T>>(result__) 1631 } 1632 } 1633 } 1634 unsafe impl<T: ::windows::runtime::RuntimeType + 'static> ::windows::runtime::RuntimeType for IVectorView<T> { 1635 const SIGNATURE: ::windows::runtime::ConstBuffer = { ::windows::runtime::ConstBuffer::new().push_slice(b"pinterface(").push_slice(b"{bbe1fa4c-b0e3-4583-baef-1f1b2e483e56}").push_slice(b";").push_other(<T as ::windows::runtime::RuntimeType>::SIGNATURE).push_slice(b")") }; 1636 } 1637 impl<T: ::windows::runtime::RuntimeType + 'static> ::std::convert::From<IVectorView<T>> for ::windows::runtime::IUnknown { from(value: IVectorView<T>) -> Self1638 fn from(value: IVectorView<T>) -> Self { 1639 unsafe { ::std::mem::transmute(value) } 1640 } 1641 } 1642 impl<T: ::windows::runtime::RuntimeType + 'static> ::std::convert::From<&IVectorView<T>> for ::windows::runtime::IUnknown { from(value: &IVectorView<T>) -> Self1643 fn from(value: &IVectorView<T>) -> Self { 1644 ::std::convert::From::from(::std::clone::Clone::clone(value)) 1645 } 1646 } 1647 impl<'a, T: ::windows::runtime::RuntimeType + 'static> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for IVectorView<T> { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown>1648 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> { 1649 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(self)) 1650 } 1651 } 1652 impl<'a, T: ::windows::runtime::RuntimeType + 'static> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for &IVectorView<T> { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown>1653 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> { 1654 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(::std::clone::Clone::clone(self))) 1655 } 1656 } 1657 impl<T: ::windows::runtime::RuntimeType + 'static> ::std::convert::From<IVectorView<T>> for ::windows::runtime::IInspectable { from(value: IVectorView<T>) -> Self1658 fn from(value: IVectorView<T>) -> Self { 1659 value.0 1660 } 1661 } 1662 impl<T: ::windows::runtime::RuntimeType + 'static> ::std::convert::From<&IVectorView<T>> for ::windows::runtime::IInspectable { from(value: &IVectorView<T>) -> Self1663 fn from(value: &IVectorView<T>) -> Self { 1664 value.0.clone() 1665 } 1666 } 1667 impl<'a, T: ::windows::runtime::RuntimeType + 'static> ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable> for IVectorView<T> { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable>1668 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable> { 1669 ::windows::runtime::Param::Owned(self.0) 1670 } 1671 } 1672 impl<'a, T: ::windows::runtime::RuntimeType + 'static> ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable> for &'a IVectorView<T> { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable>1673 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable> { 1674 ::windows::runtime::Param::Borrowed(&self.0) 1675 } 1676 } 1677 impl<T: ::windows::runtime::RuntimeType + 'static> ::std::convert::TryFrom<IVectorView<T>> for IIterable<T> { 1678 type Error = ::windows::runtime::Error; try_from(value: IVectorView<T>) -> ::windows::runtime::Result<Self>1679 fn try_from(value: IVectorView<T>) -> ::windows::runtime::Result<Self> { 1680 ::std::convert::TryFrom::try_from(&value) 1681 } 1682 } 1683 impl<T: ::windows::runtime::RuntimeType + 'static> ::std::convert::TryFrom<&IVectorView<T>> for IIterable<T> { 1684 type Error = ::windows::runtime::Error; try_from(value: &IVectorView<T>) -> ::windows::runtime::Result<Self>1685 fn try_from(value: &IVectorView<T>) -> ::windows::runtime::Result<Self> { 1686 ::windows::runtime::Interface::cast(value) 1687 } 1688 } 1689 impl<'a, T: ::windows::runtime::RuntimeType + 'static> ::windows::runtime::IntoParam<'a, IIterable<T>> for IVectorView<T> { into_param(self) -> ::windows::runtime::Param<'a, IIterable<T>>1690 fn into_param(self) -> ::windows::runtime::Param<'a, IIterable<T>> { 1691 ::windows::runtime::IntoParam::into_param(&self) 1692 } 1693 } 1694 impl<'a, T: ::windows::runtime::RuntimeType + 'static> ::windows::runtime::IntoParam<'a, IIterable<T>> for &IVectorView<T> { into_param(self) -> ::windows::runtime::Param<'a, IIterable<T>>1695 fn into_param(self) -> ::windows::runtime::Param<'a, IIterable<T>> { 1696 ::std::convert::TryInto::<IIterable<T>>::try_into(self).map(::windows::runtime::Param::Owned).unwrap_or(::windows::runtime::Param::None) 1697 } 1698 } 1699 pub struct VectorViewIterator<T: ::windows::runtime::RuntimeType + 'static> { 1700 vector: ::std::option::Option<IVectorView<T>>, 1701 current: u32, 1702 } 1703 impl<T: ::windows::runtime::RuntimeType> VectorViewIterator<T> { new(vector: ::std::option::Option<IVectorView<T>>) -> Self1704 pub fn new(vector: ::std::option::Option<IVectorView<T>>) -> Self { 1705 Self { vector, current: 0 } 1706 } 1707 } 1708 impl<T: ::windows::runtime::RuntimeType> ::std::iter::Iterator for VectorViewIterator<T> { 1709 type Item = T; next(&mut self) -> ::std::option::Option<Self::Item>1710 fn next(&mut self) -> ::std::option::Option<Self::Item> { 1711 self.vector.as_ref().and_then(|vector| vector.GetAt(self.current).ok()).and_then(|result| { 1712 self.current += 1; 1713 Some(result) 1714 }) 1715 } 1716 } 1717 impl<T: ::windows::runtime::RuntimeType> ::std::iter::IntoIterator for IVectorView<T> { 1718 type Item = T; 1719 type IntoIter = VectorViewIterator<Self::Item>; into_iter(self) -> Self::IntoIter1720 fn into_iter(self) -> Self::IntoIter { 1721 ::std::iter::IntoIterator::into_iter(&self) 1722 } 1723 } 1724 impl<T: ::windows::runtime::RuntimeType> ::std::iter::IntoIterator for &IVectorView<T> { 1725 type Item = T; 1726 type IntoIter = VectorViewIterator<Self::Item>; into_iter(self) -> Self::IntoIter1727 fn into_iter(self) -> Self::IntoIter { 1728 VectorViewIterator::new(::std::option::Option::Some(::std::clone::Clone::clone(self))) 1729 } 1730 } 1731 #[repr(C)] 1732 #[doc(hidden)] 1733 pub struct IVectorView_abi<T>( 1734 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, iid: &::windows::runtime::GUID, interface: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 1735 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32, 1736 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32, 1737 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, count: *mut u32, values: *mut *mut ::windows::runtime::GUID) -> ::windows::runtime::HRESULT, 1738 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 1739 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut i32) -> ::windows::runtime::HRESULT, 1740 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, index: u32, result__: *mut <T as ::windows::runtime::Abi>::Abi) -> ::windows::runtime::HRESULT, 1741 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, result__: *mut u32) -> ::windows::runtime::HRESULT, 1742 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: <T as ::windows::runtime::Abi>::Abi, index: *mut u32, result__: *mut bool) -> ::windows::runtime::HRESULT, 1743 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, startindex: u32, items_array_size: u32, items: *mut <T as ::windows::runtime::Abi>::Abi, result__: *mut u32) -> ::windows::runtime::HRESULT, 1744 pub ::std::marker::PhantomData<T>, 1745 ) 1746 where 1747 T: ::windows::runtime::RuntimeType + 'static; 1748 #[repr(transparent)] 1749 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: clone :: Clone, :: std :: fmt :: Debug)] 1750 pub struct MapChangedEventHandler<K, V>(::windows::runtime::IUnknown, ::std::marker::PhantomData<K>, ::std::marker::PhantomData<V>) 1751 where 1752 K: ::windows::runtime::RuntimeType + 'static, 1753 V: ::windows::runtime::RuntimeType + 'static; 1754 impl<K: ::windows::runtime::RuntimeType + 'static, V: ::windows::runtime::RuntimeType + 'static> MapChangedEventHandler<K, V> { new<F: FnMut(&::std::option::Option<IObservableMap<K, V>>, &::std::option::Option<IMapChangedEventArgs<K>>) -> ::windows::runtime::Result<()> + 'static>(invoke: F) -> Self1755 pub fn new<F: FnMut(&::std::option::Option<IObservableMap<K, V>>, &::std::option::Option<IMapChangedEventArgs<K>>) -> ::windows::runtime::Result<()> + 'static>(invoke: F) -> Self { 1756 let com = MapChangedEventHandler_box::<K, V, F> { 1757 vtable: &MapChangedEventHandler_box::<K, V, F>::VTABLE, 1758 count: ::windows::runtime::RefCount::new(1), 1759 invoke, 1760 }; 1761 unsafe { std::mem::transmute(::std::boxed::Box::new(com)) } 1762 } Invoke<'a, Param0: ::windows::runtime::IntoParam<'a, IObservableMap<K, V>>, Param1: ::windows::runtime::IntoParam<'a, IMapChangedEventArgs<K>>>(&self, sender: Param0, event: Param1) -> ::windows::runtime::Result<()>1763 pub fn Invoke<'a, Param0: ::windows::runtime::IntoParam<'a, IObservableMap<K, V>>, Param1: ::windows::runtime::IntoParam<'a, IMapChangedEventArgs<K>>>(&self, sender: Param0, event: Param1) -> ::windows::runtime::Result<()> { 1764 let this = self; 1765 unsafe { (::windows::runtime::Interface::vtable(this).3)(::std::mem::transmute_copy(this), sender.into_param().abi(), event.into_param().abi()).ok() } 1766 } 1767 } 1768 unsafe impl<K: ::windows::runtime::RuntimeType + 'static, V: ::windows::runtime::RuntimeType + 'static> ::windows::runtime::RuntimeType for MapChangedEventHandler<K, V> { 1769 const SIGNATURE: ::windows::runtime::ConstBuffer = { ::windows::runtime::ConstBuffer::new().push_slice(b"pinterface(").push_slice(b"{179517f3-94ee-41f8-bddc-768a895544f3}").push_slice(b";").push_other(<K as ::windows::runtime::RuntimeType>::SIGNATURE).push_slice(b";").push_other(<V as ::windows::runtime::RuntimeType>::SIGNATURE).push_slice(b")") }; 1770 } 1771 unsafe impl<K: ::windows::runtime::RuntimeType + 'static, V: ::windows::runtime::RuntimeType + 'static> ::windows::runtime::Interface for MapChangedEventHandler<K, V> { 1772 type Vtable = MapChangedEventHandler_abi<K, V>; 1773 const IID: ::windows::runtime::GUID = ::windows::runtime::GUID::from_signature(<MapChangedEventHandler<K, V> as ::windows::runtime::RuntimeType>::SIGNATURE); 1774 } 1775 #[repr(C)] 1776 #[doc(hidden)] 1777 pub struct MapChangedEventHandler_abi<K, V>( 1778 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, iid: &::windows::runtime::GUID, interface: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 1779 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32, 1780 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32, 1781 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, sender: ::windows::runtime::RawPtr, event: ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 1782 pub ::std::marker::PhantomData<K>, 1783 pub ::std::marker::PhantomData<V>, 1784 ) 1785 where 1786 K: ::windows::runtime::RuntimeType + 'static, 1787 V: ::windows::runtime::RuntimeType + 'static; 1788 #[repr(C)] 1789 struct MapChangedEventHandler_box<K, V, F: FnMut(&::std::option::Option<IObservableMap<K, V>>, &::std::option::Option<IMapChangedEventArgs<K>>) -> ::windows::runtime::Result<()> + 'static> 1790 where 1791 K: ::windows::runtime::RuntimeType + 'static, 1792 V: ::windows::runtime::RuntimeType + 'static, 1793 { 1794 vtable: *const MapChangedEventHandler_abi<K, V>, 1795 invoke: F, 1796 count: ::windows::runtime::RefCount, 1797 } 1798 impl<K: ::windows::runtime::RuntimeType + 'static, V: ::windows::runtime::RuntimeType + 'static, F: FnMut(&::std::option::Option<IObservableMap<K, V>>, &::std::option::Option<IMapChangedEventArgs<K>>) -> ::windows::runtime::Result<()> + 'static> MapChangedEventHandler_box<K, V, F> { 1799 const VTABLE: MapChangedEventHandler_abi<K, V> = MapChangedEventHandler_abi::<K, V>(Self::QueryInterface, Self::AddRef, Self::Release, Self::Invoke, ::std::marker::PhantomData::<K>, ::std::marker::PhantomData::<V>); QueryInterface(this: ::windows::runtime::RawPtr, iid: &::windows::runtime::GUID, interface: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT1800 unsafe extern "system" fn QueryInterface(this: ::windows::runtime::RawPtr, iid: &::windows::runtime::GUID, interface: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT { 1801 let this = this as *mut ::windows::runtime::RawPtr as *mut Self; 1802 *interface = if iid == &<MapChangedEventHandler<K, V> as ::windows::runtime::Interface>::IID || iid == &<::windows::runtime::IUnknown as ::windows::runtime::Interface>::IID || iid == &<::windows::runtime::IAgileObject as ::windows::runtime::Interface>::IID { 1803 &mut (*this).vtable as *mut _ as _ 1804 } else { 1805 ::std::ptr::null_mut() 1806 }; 1807 if (*interface).is_null() { 1808 ::windows::runtime::HRESULT(0x8000_4002) 1809 } else { 1810 (*this).count.add_ref(); 1811 ::windows::runtime::HRESULT(0) 1812 } 1813 } AddRef(this: ::windows::runtime::RawPtr) -> u321814 unsafe extern "system" fn AddRef(this: ::windows::runtime::RawPtr) -> u32 { 1815 let this = this as *mut ::windows::runtime::RawPtr as *mut Self; 1816 (*this).count.add_ref() 1817 } Release(this: ::windows::runtime::RawPtr) -> u321818 unsafe extern "system" fn Release(this: ::windows::runtime::RawPtr) -> u32 { 1819 let this = this as *mut ::windows::runtime::RawPtr as *mut Self; 1820 let remaining = (*this).count.release(); 1821 if remaining == 0 { 1822 Box::from_raw(this); 1823 } 1824 remaining 1825 } Invoke(this: ::windows::runtime::RawPtr, sender: ::windows::runtime::RawPtr, event: ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT1826 unsafe extern "system" fn Invoke(this: ::windows::runtime::RawPtr, sender: ::windows::runtime::RawPtr, event: ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT { 1827 let this = this as *mut ::windows::runtime::RawPtr as *mut Self; 1828 ((*this).invoke)( 1829 &*(&sender as *const <IObservableMap<K, V> as ::windows::runtime::Abi>::Abi as *const <IObservableMap<K, V> as ::windows::runtime::Abi>::DefaultType), 1830 &*(&event as *const <IMapChangedEventArgs<K> as ::windows::runtime::Abi>::Abi as *const <IMapChangedEventArgs<K> as ::windows::runtime::Abi>::DefaultType), 1831 ) 1832 .into() 1833 } 1834 } 1835 #[repr(transparent)] 1836 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: clone :: Clone, :: std :: fmt :: Debug)] 1837 pub struct PropertySet(::windows::runtime::IInspectable); 1838 impl PropertySet { new() -> ::windows::runtime::Result<Self>1839 pub fn new() -> ::windows::runtime::Result<Self> { 1840 Self::IActivationFactory(|f| f.activate_instance::<Self>()) 1841 } IActivationFactory<R, F: FnOnce(&::windows::runtime::IActivationFactory) -> ::windows::runtime::Result<R>>(callback: F) -> ::windows::runtime::Result<R>1842 fn IActivationFactory<R, F: FnOnce(&::windows::runtime::IActivationFactory) -> ::windows::runtime::Result<R>>(callback: F) -> ::windows::runtime::Result<R> { 1843 static mut SHARED: ::windows::runtime::FactoryCache<PropertySet, ::windows::runtime::IActivationFactory> = ::windows::runtime::FactoryCache::new(); 1844 unsafe { SHARED.call(callback) } 1845 } First(&self) -> ::windows::runtime::Result<IIterator<IKeyValuePair<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>>1846 pub fn First(&self) -> ::windows::runtime::Result<IIterator<IKeyValuePair<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>> { 1847 let this = &::windows::runtime::Interface::cast::<IIterable<IKeyValuePair<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>>(self)?; 1848 unsafe { 1849 let mut result__: ::windows::runtime::RawPtr = ::std::mem::zeroed(); 1850 (::windows::runtime::Interface::vtable(this).6)(::std::mem::transmute_copy(this), &mut result__).from_abi::<IIterator<IKeyValuePair<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>>(result__) 1851 } 1852 } Lookup<'a, Param0: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>>(&self, key: Param0) -> ::windows::runtime::Result<::windows::runtime::IInspectable>1853 pub fn Lookup<'a, Param0: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>>(&self, key: Param0) -> ::windows::runtime::Result<::windows::runtime::IInspectable> { 1854 let this = &::windows::runtime::Interface::cast::<IMap<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>(self)?; 1855 unsafe { 1856 let mut result__: ::windows::runtime::RawPtr = ::std::mem::zeroed(); 1857 (::windows::runtime::Interface::vtable(this).6)(::std::mem::transmute_copy(this), key.into_param().abi(), &mut result__).from_abi::<::windows::runtime::IInspectable>(result__) 1858 } 1859 } Size(&self) -> ::windows::runtime::Result<u32>1860 pub fn Size(&self) -> ::windows::runtime::Result<u32> { 1861 let this = &::windows::runtime::Interface::cast::<IMap<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>(self)?; 1862 unsafe { 1863 let mut result__: u32 = ::std::mem::zeroed(); 1864 (::windows::runtime::Interface::vtable(this).7)(::std::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) 1865 } 1866 } HasKey<'a, Param0: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>>(&self, key: Param0) -> ::windows::runtime::Result<bool>1867 pub fn HasKey<'a, Param0: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>>(&self, key: Param0) -> ::windows::runtime::Result<bool> { 1868 let this = &::windows::runtime::Interface::cast::<IMap<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>(self)?; 1869 unsafe { 1870 let mut result__: bool = ::std::mem::zeroed(); 1871 (::windows::runtime::Interface::vtable(this).8)(::std::mem::transmute_copy(this), key.into_param().abi(), &mut result__).from_abi::<bool>(result__) 1872 } 1873 } GetView(&self) -> ::windows::runtime::Result<IMapView<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>1874 pub fn GetView(&self) -> ::windows::runtime::Result<IMapView<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>> { 1875 let this = &::windows::runtime::Interface::cast::<IMap<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>(self)?; 1876 unsafe { 1877 let mut result__: ::windows::runtime::RawPtr = ::std::mem::zeroed(); 1878 (::windows::runtime::Interface::vtable(this).9)(::std::mem::transmute_copy(this), &mut result__).from_abi::<IMapView<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>(result__) 1879 } 1880 } Insert<'a, Param0: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>, Param1: ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable>>(&self, key: Param0, value: Param1) -> ::windows::runtime::Result<bool>1881 pub fn Insert<'a, Param0: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>, Param1: ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable>>(&self, key: Param0, value: Param1) -> ::windows::runtime::Result<bool> { 1882 let this = &::windows::runtime::Interface::cast::<IMap<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>(self)?; 1883 unsafe { 1884 let mut result__: bool = ::std::mem::zeroed(); 1885 (::windows::runtime::Interface::vtable(this).10)(::std::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi(), &mut result__).from_abi::<bool>(result__) 1886 } 1887 } Remove<'a, Param0: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>>(&self, key: Param0) -> ::windows::runtime::Result<()>1888 pub fn Remove<'a, Param0: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>>(&self, key: Param0) -> ::windows::runtime::Result<()> { 1889 let this = &::windows::runtime::Interface::cast::<IMap<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>(self)?; 1890 unsafe { (::windows::runtime::Interface::vtable(this).11)(::std::mem::transmute_copy(this), key.into_param().abi()).ok() } 1891 } Clear(&self) -> ::windows::runtime::Result<()>1892 pub fn Clear(&self) -> ::windows::runtime::Result<()> { 1893 let this = &::windows::runtime::Interface::cast::<IMap<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>(self)?; 1894 unsafe { (::windows::runtime::Interface::vtable(this).12)(::std::mem::transmute_copy(this)).ok() } 1895 } MapChanged<'a, Param0: ::windows::runtime::IntoParam<'a, MapChangedEventHandler<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>>(&self, vhnd: Param0) -> ::windows::runtime::Result<super::EventRegistrationToken>1896 pub fn MapChanged<'a, Param0: ::windows::runtime::IntoParam<'a, MapChangedEventHandler<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>>(&self, vhnd: Param0) -> ::windows::runtime::Result<super::EventRegistrationToken> { 1897 let this = &::windows::runtime::Interface::cast::<IObservableMap<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>(self)?; 1898 unsafe { 1899 let mut result__: super::EventRegistrationToken = ::std::mem::zeroed(); 1900 (::windows::runtime::Interface::vtable(this).6)(::std::mem::transmute_copy(this), vhnd.into_param().abi(), &mut result__).from_abi::<super::EventRegistrationToken>(result__) 1901 } 1902 } RemoveMapChanged<'a, Param0: ::windows::runtime::IntoParam<'a, super::EventRegistrationToken>>(&self, token: Param0) -> ::windows::runtime::Result<()>1903 pub fn RemoveMapChanged<'a, Param0: ::windows::runtime::IntoParam<'a, super::EventRegistrationToken>>(&self, token: Param0) -> ::windows::runtime::Result<()> { 1904 let this = &::windows::runtime::Interface::cast::<IObservableMap<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>(self)?; 1905 unsafe { (::windows::runtime::Interface::vtable(this).7)(::std::mem::transmute_copy(this), token.into_param().abi()).ok() } 1906 } 1907 } 1908 unsafe impl ::windows::runtime::RuntimeType for PropertySet { 1909 const SIGNATURE: ::windows::runtime::ConstBuffer = ::windows::runtime::ConstBuffer::from_slice(b"rc(Windows.Foundation.Collections.PropertySet;{8a43ed9f-f4e6-4421-acf9-1dab2986820c})"); 1910 } 1911 unsafe impl ::windows::runtime::Interface for PropertySet { 1912 type Vtable = IPropertySet_abi; 1913 const IID: ::windows::runtime::GUID = ::windows::runtime::GUID::from_values(2319707551, 62694, 17441, [172, 249, 29, 171, 41, 134, 130, 12]); 1914 } 1915 impl ::windows::runtime::RuntimeName for PropertySet { 1916 const NAME: &'static str = "Windows.Foundation.Collections.PropertySet"; 1917 } 1918 impl ::std::convert::From<PropertySet> for ::windows::runtime::IUnknown { from(value: PropertySet) -> Self1919 fn from(value: PropertySet) -> Self { 1920 unsafe { ::std::mem::transmute(value) } 1921 } 1922 } 1923 impl ::std::convert::From<&PropertySet> for ::windows::runtime::IUnknown { from(value: &PropertySet) -> Self1924 fn from(value: &PropertySet) -> Self { 1925 ::std::convert::From::from(::std::clone::Clone::clone(value)) 1926 } 1927 } 1928 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for PropertySet { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown>1929 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> { 1930 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(self)) 1931 } 1932 } 1933 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for &PropertySet { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown>1934 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> { 1935 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(::std::clone::Clone::clone(self))) 1936 } 1937 } 1938 impl ::std::convert::From<PropertySet> for ::windows::runtime::IInspectable { from(value: PropertySet) -> Self1939 fn from(value: PropertySet) -> Self { 1940 value.0 1941 } 1942 } 1943 impl ::std::convert::From<&PropertySet> for ::windows::runtime::IInspectable { from(value: &PropertySet) -> Self1944 fn from(value: &PropertySet) -> Self { 1945 value.0.clone() 1946 } 1947 } 1948 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable> for PropertySet { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable>1949 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable> { 1950 ::windows::runtime::Param::Owned(self.0) 1951 } 1952 } 1953 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable> for &'a PropertySet { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable>1954 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable> { 1955 ::windows::runtime::Param::Borrowed(&self.0) 1956 } 1957 } 1958 impl ::std::convert::From<PropertySet> for IPropertySet { from(value: PropertySet) -> Self1959 fn from(value: PropertySet) -> Self { 1960 unsafe { ::std::mem::transmute(value) } 1961 } 1962 } 1963 impl ::std::convert::From<&PropertySet> for IPropertySet { from(value: &PropertySet) -> Self1964 fn from(value: &PropertySet) -> Self { 1965 ::std::convert::From::from(::std::clone::Clone::clone(value)) 1966 } 1967 } 1968 impl<'a> ::windows::runtime::IntoParam<'a, IPropertySet> for PropertySet { into_param(self) -> ::windows::runtime::Param<'a, IPropertySet>1969 fn into_param(self) -> ::windows::runtime::Param<'a, IPropertySet> { 1970 ::windows::runtime::Param::Owned(::std::convert::Into::<IPropertySet>::into(self)) 1971 } 1972 } 1973 impl<'a> ::windows::runtime::IntoParam<'a, IPropertySet> for &PropertySet { into_param(self) -> ::windows::runtime::Param<'a, IPropertySet>1974 fn into_param(self) -> ::windows::runtime::Param<'a, IPropertySet> { 1975 ::windows::runtime::Param::Owned(::std::convert::Into::<IPropertySet>::into(::std::clone::Clone::clone(self))) 1976 } 1977 } 1978 impl ::std::convert::TryFrom<PropertySet> for IIterable<IKeyValuePair<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>> { 1979 type Error = ::windows::runtime::Error; try_from(value: PropertySet) -> ::windows::runtime::Result<Self>1980 fn try_from(value: PropertySet) -> ::windows::runtime::Result<Self> { 1981 ::std::convert::TryFrom::try_from(&value) 1982 } 1983 } 1984 impl ::std::convert::TryFrom<&PropertySet> for IIterable<IKeyValuePair<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>> { 1985 type Error = ::windows::runtime::Error; try_from(value: &PropertySet) -> ::windows::runtime::Result<Self>1986 fn try_from(value: &PropertySet) -> ::windows::runtime::Result<Self> { 1987 ::windows::runtime::Interface::cast(value) 1988 } 1989 } 1990 impl<'a> ::windows::runtime::IntoParam<'a, IIterable<IKeyValuePair<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>> for PropertySet { into_param(self) -> ::windows::runtime::Param<'a, IIterable<IKeyValuePair<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>>1991 fn into_param(self) -> ::windows::runtime::Param<'a, IIterable<IKeyValuePair<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>> { 1992 ::windows::runtime::IntoParam::into_param(&self) 1993 } 1994 } 1995 impl<'a> ::windows::runtime::IntoParam<'a, IIterable<IKeyValuePair<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>> for &PropertySet { into_param(self) -> ::windows::runtime::Param<'a, IIterable<IKeyValuePair<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>>1996 fn into_param(self) -> ::windows::runtime::Param<'a, IIterable<IKeyValuePair<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>> { 1997 ::std::convert::TryInto::<IIterable<IKeyValuePair<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>>::try_into(self).map(::windows::runtime::Param::Owned).unwrap_or(::windows::runtime::Param::None) 1998 } 1999 } 2000 impl ::std::convert::TryFrom<PropertySet> for IMap<::windows::runtime::HSTRING, ::windows::runtime::IInspectable> { 2001 type Error = ::windows::runtime::Error; try_from(value: PropertySet) -> ::windows::runtime::Result<Self>2002 fn try_from(value: PropertySet) -> ::windows::runtime::Result<Self> { 2003 ::std::convert::TryFrom::try_from(&value) 2004 } 2005 } 2006 impl ::std::convert::TryFrom<&PropertySet> for IMap<::windows::runtime::HSTRING, ::windows::runtime::IInspectable> { 2007 type Error = ::windows::runtime::Error; try_from(value: &PropertySet) -> ::windows::runtime::Result<Self>2008 fn try_from(value: &PropertySet) -> ::windows::runtime::Result<Self> { 2009 ::windows::runtime::Interface::cast(value) 2010 } 2011 } 2012 impl<'a> ::windows::runtime::IntoParam<'a, IMap<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>> for PropertySet { into_param(self) -> ::windows::runtime::Param<'a, IMap<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>2013 fn into_param(self) -> ::windows::runtime::Param<'a, IMap<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>> { 2014 ::windows::runtime::IntoParam::into_param(&self) 2015 } 2016 } 2017 impl<'a> ::windows::runtime::IntoParam<'a, IMap<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>> for &PropertySet { into_param(self) -> ::windows::runtime::Param<'a, IMap<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>2018 fn into_param(self) -> ::windows::runtime::Param<'a, IMap<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>> { 2019 ::std::convert::TryInto::<IMap<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>::try_into(self).map(::windows::runtime::Param::Owned).unwrap_or(::windows::runtime::Param::None) 2020 } 2021 } 2022 impl ::std::convert::TryFrom<PropertySet> for IObservableMap<::windows::runtime::HSTRING, ::windows::runtime::IInspectable> { 2023 type Error = ::windows::runtime::Error; try_from(value: PropertySet) -> ::windows::runtime::Result<Self>2024 fn try_from(value: PropertySet) -> ::windows::runtime::Result<Self> { 2025 ::std::convert::TryFrom::try_from(&value) 2026 } 2027 } 2028 impl ::std::convert::TryFrom<&PropertySet> for IObservableMap<::windows::runtime::HSTRING, ::windows::runtime::IInspectable> { 2029 type Error = ::windows::runtime::Error; try_from(value: &PropertySet) -> ::windows::runtime::Result<Self>2030 fn try_from(value: &PropertySet) -> ::windows::runtime::Result<Self> { 2031 ::windows::runtime::Interface::cast(value) 2032 } 2033 } 2034 impl<'a> ::windows::runtime::IntoParam<'a, IObservableMap<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>> for PropertySet { into_param(self) -> ::windows::runtime::Param<'a, IObservableMap<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>2035 fn into_param(self) -> ::windows::runtime::Param<'a, IObservableMap<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>> { 2036 ::windows::runtime::IntoParam::into_param(&self) 2037 } 2038 } 2039 impl<'a> ::windows::runtime::IntoParam<'a, IObservableMap<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>> for &PropertySet { into_param(self) -> ::windows::runtime::Param<'a, IObservableMap<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>2040 fn into_param(self) -> ::windows::runtime::Param<'a, IObservableMap<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>> { 2041 ::std::convert::TryInto::<IObservableMap<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>::try_into(self).map(::windows::runtime::Param::Owned).unwrap_or(::windows::runtime::Param::None) 2042 } 2043 } 2044 unsafe impl ::std::marker::Send for PropertySet {} 2045 unsafe impl ::std::marker::Sync for PropertySet {} 2046 #[cfg(all(feature = "Foundation_Collections"))] 2047 impl ::std::iter::IntoIterator for PropertySet { 2048 type Item = IKeyValuePair<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>; 2049 type IntoIter = IIterator<Self::Item>; into_iter(self) -> Self::IntoIter2050 fn into_iter(self) -> Self::IntoIter { 2051 ::std::iter::IntoIterator::into_iter(&self) 2052 } 2053 } 2054 #[cfg(all(feature = "Foundation_Collections"))] 2055 impl ::std::iter::IntoIterator for &PropertySet { 2056 type Item = IKeyValuePair<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>; 2057 type IntoIter = IIterator<Self::Item>; into_iter(self) -> Self::IntoIter2058 fn into_iter(self) -> Self::IntoIter { 2059 self.First().unwrap() 2060 } 2061 } 2062 #[repr(transparent)] 2063 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: clone :: Clone, :: std :: fmt :: Debug)] 2064 pub struct StringMap(::windows::runtime::IInspectable); 2065 impl StringMap { new() -> ::windows::runtime::Result<Self>2066 pub fn new() -> ::windows::runtime::Result<Self> { 2067 Self::IActivationFactory(|f| f.activate_instance::<Self>()) 2068 } IActivationFactory<R, F: FnOnce(&::windows::runtime::IActivationFactory) -> ::windows::runtime::Result<R>>(callback: F) -> ::windows::runtime::Result<R>2069 fn IActivationFactory<R, F: FnOnce(&::windows::runtime::IActivationFactory) -> ::windows::runtime::Result<R>>(callback: F) -> ::windows::runtime::Result<R> { 2070 static mut SHARED: ::windows::runtime::FactoryCache<StringMap, ::windows::runtime::IActivationFactory> = ::windows::runtime::FactoryCache::new(); 2071 unsafe { SHARED.call(callback) } 2072 } Lookup<'a, Param0: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>>(&self, key: Param0) -> ::windows::runtime::Result<::windows::runtime::HSTRING>2073 pub fn Lookup<'a, Param0: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>>(&self, key: Param0) -> ::windows::runtime::Result<::windows::runtime::HSTRING> { 2074 let this = self; 2075 unsafe { 2076 let mut result__: ::std::mem::ManuallyDrop<::windows::runtime::HSTRING> = ::std::mem::zeroed(); 2077 (::windows::runtime::Interface::vtable(this).6)(::std::mem::transmute_copy(this), key.into_param().abi(), &mut result__).from_abi::<::windows::runtime::HSTRING>(result__) 2078 } 2079 } Size(&self) -> ::windows::runtime::Result<u32>2080 pub fn Size(&self) -> ::windows::runtime::Result<u32> { 2081 let this = self; 2082 unsafe { 2083 let mut result__: u32 = ::std::mem::zeroed(); 2084 (::windows::runtime::Interface::vtable(this).7)(::std::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) 2085 } 2086 } HasKey<'a, Param0: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>>(&self, key: Param0) -> ::windows::runtime::Result<bool>2087 pub fn HasKey<'a, Param0: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>>(&self, key: Param0) -> ::windows::runtime::Result<bool> { 2088 let this = self; 2089 unsafe { 2090 let mut result__: bool = ::std::mem::zeroed(); 2091 (::windows::runtime::Interface::vtable(this).8)(::std::mem::transmute_copy(this), key.into_param().abi(), &mut result__).from_abi::<bool>(result__) 2092 } 2093 } GetView(&self) -> ::windows::runtime::Result<IMapView<::windows::runtime::HSTRING, ::windows::runtime::HSTRING>>2094 pub fn GetView(&self) -> ::windows::runtime::Result<IMapView<::windows::runtime::HSTRING, ::windows::runtime::HSTRING>> { 2095 let this = self; 2096 unsafe { 2097 let mut result__: ::windows::runtime::RawPtr = ::std::mem::zeroed(); 2098 (::windows::runtime::Interface::vtable(this).9)(::std::mem::transmute_copy(this), &mut result__).from_abi::<IMapView<::windows::runtime::HSTRING, ::windows::runtime::HSTRING>>(result__) 2099 } 2100 } Insert<'a, Param0: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>, Param1: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>>(&self, key: Param0, value: Param1) -> ::windows::runtime::Result<bool>2101 pub fn Insert<'a, Param0: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>, Param1: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>>(&self, key: Param0, value: Param1) -> ::windows::runtime::Result<bool> { 2102 let this = self; 2103 unsafe { 2104 let mut result__: bool = ::std::mem::zeroed(); 2105 (::windows::runtime::Interface::vtable(this).10)(::std::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi(), &mut result__).from_abi::<bool>(result__) 2106 } 2107 } Remove<'a, Param0: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>>(&self, key: Param0) -> ::windows::runtime::Result<()>2108 pub fn Remove<'a, Param0: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>>(&self, key: Param0) -> ::windows::runtime::Result<()> { 2109 let this = self; 2110 unsafe { (::windows::runtime::Interface::vtable(this).11)(::std::mem::transmute_copy(this), key.into_param().abi()).ok() } 2111 } Clear(&self) -> ::windows::runtime::Result<()>2112 pub fn Clear(&self) -> ::windows::runtime::Result<()> { 2113 let this = self; 2114 unsafe { (::windows::runtime::Interface::vtable(this).12)(::std::mem::transmute_copy(this)).ok() } 2115 } First(&self) -> ::windows::runtime::Result<IIterator<IKeyValuePair<::windows::runtime::HSTRING, ::windows::runtime::HSTRING>>>2116 pub fn First(&self) -> ::windows::runtime::Result<IIterator<IKeyValuePair<::windows::runtime::HSTRING, ::windows::runtime::HSTRING>>> { 2117 let this = &::windows::runtime::Interface::cast::<IIterable<IKeyValuePair<::windows::runtime::HSTRING, ::windows::runtime::HSTRING>>>(self)?; 2118 unsafe { 2119 let mut result__: ::windows::runtime::RawPtr = ::std::mem::zeroed(); 2120 (::windows::runtime::Interface::vtable(this).6)(::std::mem::transmute_copy(this), &mut result__).from_abi::<IIterator<IKeyValuePair<::windows::runtime::HSTRING, ::windows::runtime::HSTRING>>>(result__) 2121 } 2122 } MapChanged<'a, Param0: ::windows::runtime::IntoParam<'a, MapChangedEventHandler<::windows::runtime::HSTRING, ::windows::runtime::HSTRING>>>(&self, vhnd: Param0) -> ::windows::runtime::Result<super::EventRegistrationToken>2123 pub fn MapChanged<'a, Param0: ::windows::runtime::IntoParam<'a, MapChangedEventHandler<::windows::runtime::HSTRING, ::windows::runtime::HSTRING>>>(&self, vhnd: Param0) -> ::windows::runtime::Result<super::EventRegistrationToken> { 2124 let this = &::windows::runtime::Interface::cast::<IObservableMap<::windows::runtime::HSTRING, ::windows::runtime::HSTRING>>(self)?; 2125 unsafe { 2126 let mut result__: super::EventRegistrationToken = ::std::mem::zeroed(); 2127 (::windows::runtime::Interface::vtable(this).6)(::std::mem::transmute_copy(this), vhnd.into_param().abi(), &mut result__).from_abi::<super::EventRegistrationToken>(result__) 2128 } 2129 } RemoveMapChanged<'a, Param0: ::windows::runtime::IntoParam<'a, super::EventRegistrationToken>>(&self, token: Param0) -> ::windows::runtime::Result<()>2130 pub fn RemoveMapChanged<'a, Param0: ::windows::runtime::IntoParam<'a, super::EventRegistrationToken>>(&self, token: Param0) -> ::windows::runtime::Result<()> { 2131 let this = &::windows::runtime::Interface::cast::<IObservableMap<::windows::runtime::HSTRING, ::windows::runtime::HSTRING>>(self)?; 2132 unsafe { (::windows::runtime::Interface::vtable(this).7)(::std::mem::transmute_copy(this), token.into_param().abi()).ok() } 2133 } 2134 } 2135 unsafe impl ::windows::runtime::RuntimeType for StringMap { 2136 const SIGNATURE: ::windows::runtime::ConstBuffer = ::windows::runtime::ConstBuffer::from_slice(b"rc(Windows.Foundation.Collections.StringMap;pinterface({3c2925fe-8519-45c1-aa79-197b6718c1c1};string;string))"); 2137 } 2138 unsafe impl ::windows::runtime::Interface for StringMap { 2139 type Vtable = IMap_abi<::windows::runtime::HSTRING, ::windows::runtime::HSTRING>; 2140 const IID: ::windows::runtime::GUID = ::windows::runtime::GUID::from_signature(<IMap<::windows::runtime::HSTRING, ::windows::runtime::HSTRING> as ::windows::runtime::RuntimeType>::SIGNATURE); 2141 } 2142 impl ::windows::runtime::RuntimeName for StringMap { 2143 const NAME: &'static str = "Windows.Foundation.Collections.StringMap"; 2144 } 2145 impl ::std::convert::From<StringMap> for ::windows::runtime::IUnknown { from(value: StringMap) -> Self2146 fn from(value: StringMap) -> Self { 2147 unsafe { ::std::mem::transmute(value) } 2148 } 2149 } 2150 impl ::std::convert::From<&StringMap> for ::windows::runtime::IUnknown { from(value: &StringMap) -> Self2151 fn from(value: &StringMap) -> Self { 2152 ::std::convert::From::from(::std::clone::Clone::clone(value)) 2153 } 2154 } 2155 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for StringMap { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown>2156 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> { 2157 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(self)) 2158 } 2159 } 2160 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for &StringMap { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown>2161 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> { 2162 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(::std::clone::Clone::clone(self))) 2163 } 2164 } 2165 impl ::std::convert::From<StringMap> for ::windows::runtime::IInspectable { from(value: StringMap) -> Self2166 fn from(value: StringMap) -> Self { 2167 value.0 2168 } 2169 } 2170 impl ::std::convert::From<&StringMap> for ::windows::runtime::IInspectable { from(value: &StringMap) -> Self2171 fn from(value: &StringMap) -> Self { 2172 value.0.clone() 2173 } 2174 } 2175 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable> for StringMap { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable>2176 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable> { 2177 ::windows::runtime::Param::Owned(self.0) 2178 } 2179 } 2180 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable> for &'a StringMap { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable>2181 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable> { 2182 ::windows::runtime::Param::Borrowed(&self.0) 2183 } 2184 } 2185 impl ::std::convert::From<StringMap> for IMap<::windows::runtime::HSTRING, ::windows::runtime::HSTRING> { from(value: StringMap) -> Self2186 fn from(value: StringMap) -> Self { 2187 unsafe { ::std::mem::transmute(value) } 2188 } 2189 } 2190 impl ::std::convert::From<&StringMap> for IMap<::windows::runtime::HSTRING, ::windows::runtime::HSTRING> { from(value: &StringMap) -> Self2191 fn from(value: &StringMap) -> Self { 2192 ::std::convert::From::from(::std::clone::Clone::clone(value)) 2193 } 2194 } 2195 impl<'a> ::windows::runtime::IntoParam<'a, IMap<::windows::runtime::HSTRING, ::windows::runtime::HSTRING>> for StringMap { into_param(self) -> ::windows::runtime::Param<'a, IMap<::windows::runtime::HSTRING, ::windows::runtime::HSTRING>>2196 fn into_param(self) -> ::windows::runtime::Param<'a, IMap<::windows::runtime::HSTRING, ::windows::runtime::HSTRING>> { 2197 ::windows::runtime::Param::Owned(::std::convert::Into::<IMap<::windows::runtime::HSTRING, ::windows::runtime::HSTRING>>::into(self)) 2198 } 2199 } 2200 impl<'a> ::windows::runtime::IntoParam<'a, IMap<::windows::runtime::HSTRING, ::windows::runtime::HSTRING>> for &StringMap { into_param(self) -> ::windows::runtime::Param<'a, IMap<::windows::runtime::HSTRING, ::windows::runtime::HSTRING>>2201 fn into_param(self) -> ::windows::runtime::Param<'a, IMap<::windows::runtime::HSTRING, ::windows::runtime::HSTRING>> { 2202 ::windows::runtime::Param::Owned(::std::convert::Into::<IMap<::windows::runtime::HSTRING, ::windows::runtime::HSTRING>>::into(::std::clone::Clone::clone(self))) 2203 } 2204 } 2205 impl ::std::convert::TryFrom<StringMap> for IIterable<IKeyValuePair<::windows::runtime::HSTRING, ::windows::runtime::HSTRING>> { 2206 type Error = ::windows::runtime::Error; try_from(value: StringMap) -> ::windows::runtime::Result<Self>2207 fn try_from(value: StringMap) -> ::windows::runtime::Result<Self> { 2208 ::std::convert::TryFrom::try_from(&value) 2209 } 2210 } 2211 impl ::std::convert::TryFrom<&StringMap> for IIterable<IKeyValuePair<::windows::runtime::HSTRING, ::windows::runtime::HSTRING>> { 2212 type Error = ::windows::runtime::Error; try_from(value: &StringMap) -> ::windows::runtime::Result<Self>2213 fn try_from(value: &StringMap) -> ::windows::runtime::Result<Self> { 2214 ::windows::runtime::Interface::cast(value) 2215 } 2216 } 2217 impl<'a> ::windows::runtime::IntoParam<'a, IIterable<IKeyValuePair<::windows::runtime::HSTRING, ::windows::runtime::HSTRING>>> for StringMap { into_param(self) -> ::windows::runtime::Param<'a, IIterable<IKeyValuePair<::windows::runtime::HSTRING, ::windows::runtime::HSTRING>>>2218 fn into_param(self) -> ::windows::runtime::Param<'a, IIterable<IKeyValuePair<::windows::runtime::HSTRING, ::windows::runtime::HSTRING>>> { 2219 ::windows::runtime::IntoParam::into_param(&self) 2220 } 2221 } 2222 impl<'a> ::windows::runtime::IntoParam<'a, IIterable<IKeyValuePair<::windows::runtime::HSTRING, ::windows::runtime::HSTRING>>> for &StringMap { into_param(self) -> ::windows::runtime::Param<'a, IIterable<IKeyValuePair<::windows::runtime::HSTRING, ::windows::runtime::HSTRING>>>2223 fn into_param(self) -> ::windows::runtime::Param<'a, IIterable<IKeyValuePair<::windows::runtime::HSTRING, ::windows::runtime::HSTRING>>> { 2224 ::std::convert::TryInto::<IIterable<IKeyValuePair<::windows::runtime::HSTRING, ::windows::runtime::HSTRING>>>::try_into(self).map(::windows::runtime::Param::Owned).unwrap_or(::windows::runtime::Param::None) 2225 } 2226 } 2227 impl ::std::convert::TryFrom<StringMap> for IObservableMap<::windows::runtime::HSTRING, ::windows::runtime::HSTRING> { 2228 type Error = ::windows::runtime::Error; try_from(value: StringMap) -> ::windows::runtime::Result<Self>2229 fn try_from(value: StringMap) -> ::windows::runtime::Result<Self> { 2230 ::std::convert::TryFrom::try_from(&value) 2231 } 2232 } 2233 impl ::std::convert::TryFrom<&StringMap> for IObservableMap<::windows::runtime::HSTRING, ::windows::runtime::HSTRING> { 2234 type Error = ::windows::runtime::Error; try_from(value: &StringMap) -> ::windows::runtime::Result<Self>2235 fn try_from(value: &StringMap) -> ::windows::runtime::Result<Self> { 2236 ::windows::runtime::Interface::cast(value) 2237 } 2238 } 2239 impl<'a> ::windows::runtime::IntoParam<'a, IObservableMap<::windows::runtime::HSTRING, ::windows::runtime::HSTRING>> for StringMap { into_param(self) -> ::windows::runtime::Param<'a, IObservableMap<::windows::runtime::HSTRING, ::windows::runtime::HSTRING>>2240 fn into_param(self) -> ::windows::runtime::Param<'a, IObservableMap<::windows::runtime::HSTRING, ::windows::runtime::HSTRING>> { 2241 ::windows::runtime::IntoParam::into_param(&self) 2242 } 2243 } 2244 impl<'a> ::windows::runtime::IntoParam<'a, IObservableMap<::windows::runtime::HSTRING, ::windows::runtime::HSTRING>> for &StringMap { into_param(self) -> ::windows::runtime::Param<'a, IObservableMap<::windows::runtime::HSTRING, ::windows::runtime::HSTRING>>2245 fn into_param(self) -> ::windows::runtime::Param<'a, IObservableMap<::windows::runtime::HSTRING, ::windows::runtime::HSTRING>> { 2246 ::std::convert::TryInto::<IObservableMap<::windows::runtime::HSTRING, ::windows::runtime::HSTRING>>::try_into(self).map(::windows::runtime::Param::Owned).unwrap_or(::windows::runtime::Param::None) 2247 } 2248 } 2249 unsafe impl ::std::marker::Send for StringMap {} 2250 unsafe impl ::std::marker::Sync for StringMap {} 2251 #[cfg(all(feature = "Foundation_Collections"))] 2252 impl ::std::iter::IntoIterator for StringMap { 2253 type Item = IKeyValuePair<::windows::runtime::HSTRING, ::windows::runtime::HSTRING>; 2254 type IntoIter = IIterator<Self::Item>; into_iter(self) -> Self::IntoIter2255 fn into_iter(self) -> Self::IntoIter { 2256 ::std::iter::IntoIterator::into_iter(&self) 2257 } 2258 } 2259 #[cfg(all(feature = "Foundation_Collections"))] 2260 impl ::std::iter::IntoIterator for &StringMap { 2261 type Item = IKeyValuePair<::windows::runtime::HSTRING, ::windows::runtime::HSTRING>; 2262 type IntoIter = IIterator<Self::Item>; into_iter(self) -> Self::IntoIter2263 fn into_iter(self) -> Self::IntoIter { 2264 self.First().unwrap() 2265 } 2266 } 2267 #[repr(transparent)] 2268 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: clone :: Clone, :: std :: fmt :: Debug)] 2269 pub struct ValueSet(::windows::runtime::IInspectable); 2270 impl ValueSet { new() -> ::windows::runtime::Result<Self>2271 pub fn new() -> ::windows::runtime::Result<Self> { 2272 Self::IActivationFactory(|f| f.activate_instance::<Self>()) 2273 } IActivationFactory<R, F: FnOnce(&::windows::runtime::IActivationFactory) -> ::windows::runtime::Result<R>>(callback: F) -> ::windows::runtime::Result<R>2274 fn IActivationFactory<R, F: FnOnce(&::windows::runtime::IActivationFactory) -> ::windows::runtime::Result<R>>(callback: F) -> ::windows::runtime::Result<R> { 2275 static mut SHARED: ::windows::runtime::FactoryCache<ValueSet, ::windows::runtime::IActivationFactory> = ::windows::runtime::FactoryCache::new(); 2276 unsafe { SHARED.call(callback) } 2277 } First(&self) -> ::windows::runtime::Result<IIterator<IKeyValuePair<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>>2278 pub fn First(&self) -> ::windows::runtime::Result<IIterator<IKeyValuePair<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>> { 2279 let this = &::windows::runtime::Interface::cast::<IIterable<IKeyValuePair<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>>(self)?; 2280 unsafe { 2281 let mut result__: ::windows::runtime::RawPtr = ::std::mem::zeroed(); 2282 (::windows::runtime::Interface::vtable(this).6)(::std::mem::transmute_copy(this), &mut result__).from_abi::<IIterator<IKeyValuePair<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>>(result__) 2283 } 2284 } Lookup<'a, Param0: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>>(&self, key: Param0) -> ::windows::runtime::Result<::windows::runtime::IInspectable>2285 pub fn Lookup<'a, Param0: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>>(&self, key: Param0) -> ::windows::runtime::Result<::windows::runtime::IInspectable> { 2286 let this = &::windows::runtime::Interface::cast::<IMap<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>(self)?; 2287 unsafe { 2288 let mut result__: ::windows::runtime::RawPtr = ::std::mem::zeroed(); 2289 (::windows::runtime::Interface::vtable(this).6)(::std::mem::transmute_copy(this), key.into_param().abi(), &mut result__).from_abi::<::windows::runtime::IInspectable>(result__) 2290 } 2291 } Size(&self) -> ::windows::runtime::Result<u32>2292 pub fn Size(&self) -> ::windows::runtime::Result<u32> { 2293 let this = &::windows::runtime::Interface::cast::<IMap<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>(self)?; 2294 unsafe { 2295 let mut result__: u32 = ::std::mem::zeroed(); 2296 (::windows::runtime::Interface::vtable(this).7)(::std::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) 2297 } 2298 } HasKey<'a, Param0: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>>(&self, key: Param0) -> ::windows::runtime::Result<bool>2299 pub fn HasKey<'a, Param0: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>>(&self, key: Param0) -> ::windows::runtime::Result<bool> { 2300 let this = &::windows::runtime::Interface::cast::<IMap<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>(self)?; 2301 unsafe { 2302 let mut result__: bool = ::std::mem::zeroed(); 2303 (::windows::runtime::Interface::vtable(this).8)(::std::mem::transmute_copy(this), key.into_param().abi(), &mut result__).from_abi::<bool>(result__) 2304 } 2305 } GetView(&self) -> ::windows::runtime::Result<IMapView<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>2306 pub fn GetView(&self) -> ::windows::runtime::Result<IMapView<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>> { 2307 let this = &::windows::runtime::Interface::cast::<IMap<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>(self)?; 2308 unsafe { 2309 let mut result__: ::windows::runtime::RawPtr = ::std::mem::zeroed(); 2310 (::windows::runtime::Interface::vtable(this).9)(::std::mem::transmute_copy(this), &mut result__).from_abi::<IMapView<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>(result__) 2311 } 2312 } Insert<'a, Param0: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>, Param1: ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable>>(&self, key: Param0, value: Param1) -> ::windows::runtime::Result<bool>2313 pub fn Insert<'a, Param0: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>, Param1: ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable>>(&self, key: Param0, value: Param1) -> ::windows::runtime::Result<bool> { 2314 let this = &::windows::runtime::Interface::cast::<IMap<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>(self)?; 2315 unsafe { 2316 let mut result__: bool = ::std::mem::zeroed(); 2317 (::windows::runtime::Interface::vtable(this).10)(::std::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi(), &mut result__).from_abi::<bool>(result__) 2318 } 2319 } Remove<'a, Param0: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>>(&self, key: Param0) -> ::windows::runtime::Result<()>2320 pub fn Remove<'a, Param0: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>>(&self, key: Param0) -> ::windows::runtime::Result<()> { 2321 let this = &::windows::runtime::Interface::cast::<IMap<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>(self)?; 2322 unsafe { (::windows::runtime::Interface::vtable(this).11)(::std::mem::transmute_copy(this), key.into_param().abi()).ok() } 2323 } Clear(&self) -> ::windows::runtime::Result<()>2324 pub fn Clear(&self) -> ::windows::runtime::Result<()> { 2325 let this = &::windows::runtime::Interface::cast::<IMap<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>(self)?; 2326 unsafe { (::windows::runtime::Interface::vtable(this).12)(::std::mem::transmute_copy(this)).ok() } 2327 } MapChanged<'a, Param0: ::windows::runtime::IntoParam<'a, MapChangedEventHandler<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>>(&self, vhnd: Param0) -> ::windows::runtime::Result<super::EventRegistrationToken>2328 pub fn MapChanged<'a, Param0: ::windows::runtime::IntoParam<'a, MapChangedEventHandler<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>>(&self, vhnd: Param0) -> ::windows::runtime::Result<super::EventRegistrationToken> { 2329 let this = &::windows::runtime::Interface::cast::<IObservableMap<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>(self)?; 2330 unsafe { 2331 let mut result__: super::EventRegistrationToken = ::std::mem::zeroed(); 2332 (::windows::runtime::Interface::vtable(this).6)(::std::mem::transmute_copy(this), vhnd.into_param().abi(), &mut result__).from_abi::<super::EventRegistrationToken>(result__) 2333 } 2334 } RemoveMapChanged<'a, Param0: ::windows::runtime::IntoParam<'a, super::EventRegistrationToken>>(&self, token: Param0) -> ::windows::runtime::Result<()>2335 pub fn RemoveMapChanged<'a, Param0: ::windows::runtime::IntoParam<'a, super::EventRegistrationToken>>(&self, token: Param0) -> ::windows::runtime::Result<()> { 2336 let this = &::windows::runtime::Interface::cast::<IObservableMap<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>(self)?; 2337 unsafe { (::windows::runtime::Interface::vtable(this).7)(::std::mem::transmute_copy(this), token.into_param().abi()).ok() } 2338 } 2339 } 2340 unsafe impl ::windows::runtime::RuntimeType for ValueSet { 2341 const SIGNATURE: ::windows::runtime::ConstBuffer = ::windows::runtime::ConstBuffer::from_slice(b"rc(Windows.Foundation.Collections.ValueSet;{8a43ed9f-f4e6-4421-acf9-1dab2986820c})"); 2342 } 2343 unsafe impl ::windows::runtime::Interface for ValueSet { 2344 type Vtable = IPropertySet_abi; 2345 const IID: ::windows::runtime::GUID = ::windows::runtime::GUID::from_values(2319707551, 62694, 17441, [172, 249, 29, 171, 41, 134, 130, 12]); 2346 } 2347 impl ::windows::runtime::RuntimeName for ValueSet { 2348 const NAME: &'static str = "Windows.Foundation.Collections.ValueSet"; 2349 } 2350 impl ::std::convert::From<ValueSet> for ::windows::runtime::IUnknown { from(value: ValueSet) -> Self2351 fn from(value: ValueSet) -> Self { 2352 unsafe { ::std::mem::transmute(value) } 2353 } 2354 } 2355 impl ::std::convert::From<&ValueSet> for ::windows::runtime::IUnknown { from(value: &ValueSet) -> Self2356 fn from(value: &ValueSet) -> Self { 2357 ::std::convert::From::from(::std::clone::Clone::clone(value)) 2358 } 2359 } 2360 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for ValueSet { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown>2361 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> { 2362 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(self)) 2363 } 2364 } 2365 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for &ValueSet { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown>2366 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> { 2367 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(::std::clone::Clone::clone(self))) 2368 } 2369 } 2370 impl ::std::convert::From<ValueSet> for ::windows::runtime::IInspectable { from(value: ValueSet) -> Self2371 fn from(value: ValueSet) -> Self { 2372 value.0 2373 } 2374 } 2375 impl ::std::convert::From<&ValueSet> for ::windows::runtime::IInspectable { from(value: &ValueSet) -> Self2376 fn from(value: &ValueSet) -> Self { 2377 value.0.clone() 2378 } 2379 } 2380 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable> for ValueSet { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable>2381 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable> { 2382 ::windows::runtime::Param::Owned(self.0) 2383 } 2384 } 2385 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable> for &'a ValueSet { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable>2386 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable> { 2387 ::windows::runtime::Param::Borrowed(&self.0) 2388 } 2389 } 2390 impl ::std::convert::From<ValueSet> for IPropertySet { from(value: ValueSet) -> Self2391 fn from(value: ValueSet) -> Self { 2392 unsafe { ::std::mem::transmute(value) } 2393 } 2394 } 2395 impl ::std::convert::From<&ValueSet> for IPropertySet { from(value: &ValueSet) -> Self2396 fn from(value: &ValueSet) -> Self { 2397 ::std::convert::From::from(::std::clone::Clone::clone(value)) 2398 } 2399 } 2400 impl<'a> ::windows::runtime::IntoParam<'a, IPropertySet> for ValueSet { into_param(self) -> ::windows::runtime::Param<'a, IPropertySet>2401 fn into_param(self) -> ::windows::runtime::Param<'a, IPropertySet> { 2402 ::windows::runtime::Param::Owned(::std::convert::Into::<IPropertySet>::into(self)) 2403 } 2404 } 2405 impl<'a> ::windows::runtime::IntoParam<'a, IPropertySet> for &ValueSet { into_param(self) -> ::windows::runtime::Param<'a, IPropertySet>2406 fn into_param(self) -> ::windows::runtime::Param<'a, IPropertySet> { 2407 ::windows::runtime::Param::Owned(::std::convert::Into::<IPropertySet>::into(::std::clone::Clone::clone(self))) 2408 } 2409 } 2410 impl ::std::convert::TryFrom<ValueSet> for IIterable<IKeyValuePair<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>> { 2411 type Error = ::windows::runtime::Error; try_from(value: ValueSet) -> ::windows::runtime::Result<Self>2412 fn try_from(value: ValueSet) -> ::windows::runtime::Result<Self> { 2413 ::std::convert::TryFrom::try_from(&value) 2414 } 2415 } 2416 impl ::std::convert::TryFrom<&ValueSet> for IIterable<IKeyValuePair<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>> { 2417 type Error = ::windows::runtime::Error; try_from(value: &ValueSet) -> ::windows::runtime::Result<Self>2418 fn try_from(value: &ValueSet) -> ::windows::runtime::Result<Self> { 2419 ::windows::runtime::Interface::cast(value) 2420 } 2421 } 2422 impl<'a> ::windows::runtime::IntoParam<'a, IIterable<IKeyValuePair<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>> for ValueSet { into_param(self) -> ::windows::runtime::Param<'a, IIterable<IKeyValuePair<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>>2423 fn into_param(self) -> ::windows::runtime::Param<'a, IIterable<IKeyValuePair<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>> { 2424 ::windows::runtime::IntoParam::into_param(&self) 2425 } 2426 } 2427 impl<'a> ::windows::runtime::IntoParam<'a, IIterable<IKeyValuePair<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>> for &ValueSet { into_param(self) -> ::windows::runtime::Param<'a, IIterable<IKeyValuePair<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>>2428 fn into_param(self) -> ::windows::runtime::Param<'a, IIterable<IKeyValuePair<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>> { 2429 ::std::convert::TryInto::<IIterable<IKeyValuePair<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>>::try_into(self).map(::windows::runtime::Param::Owned).unwrap_or(::windows::runtime::Param::None) 2430 } 2431 } 2432 impl ::std::convert::TryFrom<ValueSet> for IMap<::windows::runtime::HSTRING, ::windows::runtime::IInspectable> { 2433 type Error = ::windows::runtime::Error; try_from(value: ValueSet) -> ::windows::runtime::Result<Self>2434 fn try_from(value: ValueSet) -> ::windows::runtime::Result<Self> { 2435 ::std::convert::TryFrom::try_from(&value) 2436 } 2437 } 2438 impl ::std::convert::TryFrom<&ValueSet> for IMap<::windows::runtime::HSTRING, ::windows::runtime::IInspectable> { 2439 type Error = ::windows::runtime::Error; try_from(value: &ValueSet) -> ::windows::runtime::Result<Self>2440 fn try_from(value: &ValueSet) -> ::windows::runtime::Result<Self> { 2441 ::windows::runtime::Interface::cast(value) 2442 } 2443 } 2444 impl<'a> ::windows::runtime::IntoParam<'a, IMap<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>> for ValueSet { into_param(self) -> ::windows::runtime::Param<'a, IMap<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>2445 fn into_param(self) -> ::windows::runtime::Param<'a, IMap<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>> { 2446 ::windows::runtime::IntoParam::into_param(&self) 2447 } 2448 } 2449 impl<'a> ::windows::runtime::IntoParam<'a, IMap<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>> for &ValueSet { into_param(self) -> ::windows::runtime::Param<'a, IMap<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>2450 fn into_param(self) -> ::windows::runtime::Param<'a, IMap<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>> { 2451 ::std::convert::TryInto::<IMap<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>::try_into(self).map(::windows::runtime::Param::Owned).unwrap_or(::windows::runtime::Param::None) 2452 } 2453 } 2454 impl ::std::convert::TryFrom<ValueSet> for IObservableMap<::windows::runtime::HSTRING, ::windows::runtime::IInspectable> { 2455 type Error = ::windows::runtime::Error; try_from(value: ValueSet) -> ::windows::runtime::Result<Self>2456 fn try_from(value: ValueSet) -> ::windows::runtime::Result<Self> { 2457 ::std::convert::TryFrom::try_from(&value) 2458 } 2459 } 2460 impl ::std::convert::TryFrom<&ValueSet> for IObservableMap<::windows::runtime::HSTRING, ::windows::runtime::IInspectable> { 2461 type Error = ::windows::runtime::Error; try_from(value: &ValueSet) -> ::windows::runtime::Result<Self>2462 fn try_from(value: &ValueSet) -> ::windows::runtime::Result<Self> { 2463 ::windows::runtime::Interface::cast(value) 2464 } 2465 } 2466 impl<'a> ::windows::runtime::IntoParam<'a, IObservableMap<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>> for ValueSet { into_param(self) -> ::windows::runtime::Param<'a, IObservableMap<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>2467 fn into_param(self) -> ::windows::runtime::Param<'a, IObservableMap<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>> { 2468 ::windows::runtime::IntoParam::into_param(&self) 2469 } 2470 } 2471 impl<'a> ::windows::runtime::IntoParam<'a, IObservableMap<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>> for &ValueSet { into_param(self) -> ::windows::runtime::Param<'a, IObservableMap<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>2472 fn into_param(self) -> ::windows::runtime::Param<'a, IObservableMap<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>> { 2473 ::std::convert::TryInto::<IObservableMap<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>>::try_into(self).map(::windows::runtime::Param::Owned).unwrap_or(::windows::runtime::Param::None) 2474 } 2475 } 2476 unsafe impl ::std::marker::Send for ValueSet {} 2477 unsafe impl ::std::marker::Sync for ValueSet {} 2478 #[cfg(all(feature = "Foundation_Collections"))] 2479 impl ::std::iter::IntoIterator for ValueSet { 2480 type Item = IKeyValuePair<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>; 2481 type IntoIter = IIterator<Self::Item>; into_iter(self) -> Self::IntoIter2482 fn into_iter(self) -> Self::IntoIter { 2483 ::std::iter::IntoIterator::into_iter(&self) 2484 } 2485 } 2486 #[cfg(all(feature = "Foundation_Collections"))] 2487 impl ::std::iter::IntoIterator for &ValueSet { 2488 type Item = IKeyValuePair<::windows::runtime::HSTRING, ::windows::runtime::IInspectable>; 2489 type IntoIter = IIterator<Self::Item>; into_iter(self) -> Self::IntoIter2490 fn into_iter(self) -> Self::IntoIter { 2491 self.First().unwrap() 2492 } 2493 } 2494 #[repr(transparent)] 2495 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: clone :: Clone, :: std :: fmt :: Debug)] 2496 pub struct VectorChangedEventHandler<T>(::windows::runtime::IUnknown, ::std::marker::PhantomData<T>) 2497 where 2498 T: ::windows::runtime::RuntimeType + 'static; 2499 impl<T: ::windows::runtime::RuntimeType + 'static> VectorChangedEventHandler<T> { new<F: FnMut(&::std::option::Option<IObservableVector<T>>, &::std::option::Option<IVectorChangedEventArgs>) -> ::windows::runtime::Result<()> + 'static>(invoke: F) -> Self2500 pub fn new<F: FnMut(&::std::option::Option<IObservableVector<T>>, &::std::option::Option<IVectorChangedEventArgs>) -> ::windows::runtime::Result<()> + 'static>(invoke: F) -> Self { 2501 let com = VectorChangedEventHandler_box::<T, F> { 2502 vtable: &VectorChangedEventHandler_box::<T, F>::VTABLE, 2503 count: ::windows::runtime::RefCount::new(1), 2504 invoke, 2505 }; 2506 unsafe { std::mem::transmute(::std::boxed::Box::new(com)) } 2507 } Invoke<'a, Param0: ::windows::runtime::IntoParam<'a, IObservableVector<T>>, Param1: ::windows::runtime::IntoParam<'a, IVectorChangedEventArgs>>(&self, sender: Param0, event: Param1) -> ::windows::runtime::Result<()>2508 pub fn Invoke<'a, Param0: ::windows::runtime::IntoParam<'a, IObservableVector<T>>, Param1: ::windows::runtime::IntoParam<'a, IVectorChangedEventArgs>>(&self, sender: Param0, event: Param1) -> ::windows::runtime::Result<()> { 2509 let this = self; 2510 unsafe { (::windows::runtime::Interface::vtable(this).3)(::std::mem::transmute_copy(this), sender.into_param().abi(), event.into_param().abi()).ok() } 2511 } 2512 } 2513 unsafe impl<T: ::windows::runtime::RuntimeType + 'static> ::windows::runtime::RuntimeType for VectorChangedEventHandler<T> { 2514 const SIGNATURE: ::windows::runtime::ConstBuffer = { ::windows::runtime::ConstBuffer::new().push_slice(b"pinterface(").push_slice(b"{0c051752-9fbf-4c70-aa0c-0e4c82d9a761}").push_slice(b";").push_other(<T as ::windows::runtime::RuntimeType>::SIGNATURE).push_slice(b")") }; 2515 } 2516 unsafe impl<T: ::windows::runtime::RuntimeType + 'static> ::windows::runtime::Interface for VectorChangedEventHandler<T> { 2517 type Vtable = VectorChangedEventHandler_abi<T>; 2518 const IID: ::windows::runtime::GUID = ::windows::runtime::GUID::from_signature(<VectorChangedEventHandler<T> as ::windows::runtime::RuntimeType>::SIGNATURE); 2519 } 2520 #[repr(C)] 2521 #[doc(hidden)] 2522 pub struct VectorChangedEventHandler_abi<T>( 2523 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, iid: &::windows::runtime::GUID, interface: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 2524 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32, 2525 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32, 2526 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, sender: ::windows::runtime::RawPtr, event: ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 2527 pub ::std::marker::PhantomData<T>, 2528 ) 2529 where 2530 T: ::windows::runtime::RuntimeType + 'static; 2531 #[repr(C)] 2532 struct VectorChangedEventHandler_box<T, F: FnMut(&::std::option::Option<IObservableVector<T>>, &::std::option::Option<IVectorChangedEventArgs>) -> ::windows::runtime::Result<()> + 'static> 2533 where 2534 T: ::windows::runtime::RuntimeType + 'static, 2535 { 2536 vtable: *const VectorChangedEventHandler_abi<T>, 2537 invoke: F, 2538 count: ::windows::runtime::RefCount, 2539 } 2540 impl<T: ::windows::runtime::RuntimeType + 'static, F: FnMut(&::std::option::Option<IObservableVector<T>>, &::std::option::Option<IVectorChangedEventArgs>) -> ::windows::runtime::Result<()> + 'static> VectorChangedEventHandler_box<T, F> { 2541 const VTABLE: VectorChangedEventHandler_abi<T> = VectorChangedEventHandler_abi::<T>(Self::QueryInterface, Self::AddRef, Self::Release, Self::Invoke, ::std::marker::PhantomData::<T>); QueryInterface(this: ::windows::runtime::RawPtr, iid: &::windows::runtime::GUID, interface: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT2542 unsafe extern "system" fn QueryInterface(this: ::windows::runtime::RawPtr, iid: &::windows::runtime::GUID, interface: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT { 2543 let this = this as *mut ::windows::runtime::RawPtr as *mut Self; 2544 *interface = if iid == &<VectorChangedEventHandler<T> as ::windows::runtime::Interface>::IID || iid == &<::windows::runtime::IUnknown as ::windows::runtime::Interface>::IID || iid == &<::windows::runtime::IAgileObject as ::windows::runtime::Interface>::IID { 2545 &mut (*this).vtable as *mut _ as _ 2546 } else { 2547 ::std::ptr::null_mut() 2548 }; 2549 if (*interface).is_null() { 2550 ::windows::runtime::HRESULT(0x8000_4002) 2551 } else { 2552 (*this).count.add_ref(); 2553 ::windows::runtime::HRESULT(0) 2554 } 2555 } AddRef(this: ::windows::runtime::RawPtr) -> u322556 unsafe extern "system" fn AddRef(this: ::windows::runtime::RawPtr) -> u32 { 2557 let this = this as *mut ::windows::runtime::RawPtr as *mut Self; 2558 (*this).count.add_ref() 2559 } Release(this: ::windows::runtime::RawPtr) -> u322560 unsafe extern "system" fn Release(this: ::windows::runtime::RawPtr) -> u32 { 2561 let this = this as *mut ::windows::runtime::RawPtr as *mut Self; 2562 let remaining = (*this).count.release(); 2563 if remaining == 0 { 2564 Box::from_raw(this); 2565 } 2566 remaining 2567 } Invoke(this: ::windows::runtime::RawPtr, sender: ::windows::runtime::RawPtr, event: ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT2568 unsafe extern "system" fn Invoke(this: ::windows::runtime::RawPtr, sender: ::windows::runtime::RawPtr, event: ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT { 2569 let this = this as *mut ::windows::runtime::RawPtr as *mut Self; 2570 ((*this).invoke)( 2571 &*(&sender as *const <IObservableVector<T> as ::windows::runtime::Abi>::Abi as *const <IObservableVector<T> as ::windows::runtime::Abi>::DefaultType), 2572 &*(&event as *const <IVectorChangedEventArgs as ::windows::runtime::Abi>::Abi as *const <IVectorChangedEventArgs as ::windows::runtime::Abi>::DefaultType), 2573 ) 2574 .into() 2575 } 2576 } 2577