#[repr(transparent)] #[derive(Clone, Debug, Eq, PartialEq)] pub struct IIterable(windows_core::IUnknown, core::marker::PhantomData) where T: windows_core::RuntimeType + 'static; impl windows_core::imp::CanInto for IIterable { } impl windows_core::imp::CanInto for IIterable { } unsafe impl windows_core::Interface for IIterable { type Vtable = IIterable_Vtbl; const IID: windows_core::GUID = windows_core::GUID::from_signature(::SIGNATURE); } impl windows_core::RuntimeType for IIterable { const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::new() .push_slice(b"pinterface({faa585ea-6214-4217-afda-7f46de5869b3}") .push_slice(b";") .push_other(T::SIGNATURE) .push_slice(b")"); } impl IIterable { pub fn First(&self) -> windows_core::Result> { let this = self; unsafe { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(this).First)( windows_core::Interface::as_raw(this), &mut result__, ) .and_then(|| windows_core::Type::from_abi(result__)) } } } impl windows_core::RuntimeName for IIterable { const NAME: &'static str = "Windows.Foundation.Collections.IIterable"; } pub trait IIterable_Impl: windows_core::IUnknownImpl where T: windows_core::RuntimeType + 'static, { fn First(&self) -> windows_core::Result>; } impl IIterable_Vtbl { pub const fn new, const OFFSET: isize>() -> Self { unsafe extern "system" fn First< T: windows_core::RuntimeType + 'static, Identity: IIterable_Impl, const OFFSET: isize, >( this: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void, ) -> windows_core::HRESULT { unsafe { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); match IIterable_Impl::First(this) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); core::mem::forget(ok__); windows_core::HRESULT(0) } Err(err) => err.into(), } } } Self { base__: windows_core::IInspectable_Vtbl::new::, OFFSET>(), First: First::, T: core::marker::PhantomData::, } } pub fn matches(iid: &windows_core::GUID) -> bool { iid == & as windows_core::Interface>::IID } } #[repr(C)] #[doc(hidden)] pub struct IIterable_Vtbl where T: windows_core::RuntimeType + 'static, { pub base__: windows_core::IInspectable_Vtbl, pub First: unsafe extern "system" fn( *mut core::ffi::c_void, *mut *mut core::ffi::c_void, ) -> windows_core::HRESULT, T: core::marker::PhantomData, } impl IntoIterator for IIterable { type Item = T; type IntoIter = IIterator; fn into_iter(self) -> Self::IntoIter { IntoIterator::into_iter(&self) } } impl IntoIterator for &IIterable { type Item = T; type IntoIter = IIterator; fn into_iter(self) -> Self::IntoIter { self.First().unwrap() } } #[repr(transparent)] #[derive(Clone, Debug, Eq, PartialEq)] pub struct IIterator(windows_core::IUnknown, core::marker::PhantomData) where T: windows_core::RuntimeType + 'static; impl windows_core::imp::CanInto for IIterator { } impl windows_core::imp::CanInto for IIterator { } unsafe impl windows_core::Interface for IIterator { type Vtable = IIterator_Vtbl; const IID: windows_core::GUID = windows_core::GUID::from_signature(::SIGNATURE); } impl windows_core::RuntimeType for IIterator { const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::new() .push_slice(b"pinterface({6a79e863-4300-459a-9966-cbb660963ee1}") .push_slice(b";") .push_other(T::SIGNATURE) .push_slice(b")"); } impl IIterator { pub fn Current(&self) -> windows_core::Result { let this = self; unsafe { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(this).Current)( windows_core::Interface::as_raw(this), &mut result__, ) .and_then(|| windows_core::Type::from_abi(result__)) } } pub fn HasCurrent(&self) -> windows_core::Result { let this = self; unsafe { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(this).HasCurrent)( windows_core::Interface::as_raw(this), &mut result__, ) .map(|| result__) } } pub fn MoveNext(&self) -> windows_core::Result { let this = self; unsafe { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(this).MoveNext)( windows_core::Interface::as_raw(this), &mut result__, ) .map(|| result__) } } pub fn GetMany( &self, items: &mut [>::Default], ) -> windows_core::Result { let this = self; unsafe { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(this).GetMany)( windows_core::Interface::as_raw(this), items.len().try_into().unwrap(), core::mem::transmute_copy(&items), &mut result__, ) .map(|| result__) } } } impl windows_core::RuntimeName for IIterator { const NAME: &'static str = "Windows.Foundation.Collections.IIterator"; } pub trait IIterator_Impl: windows_core::IUnknownImpl where T: windows_core::RuntimeType + 'static, { fn Current(&self) -> windows_core::Result; fn HasCurrent(&self) -> windows_core::Result; fn MoveNext(&self) -> windows_core::Result; fn GetMany( &self, items: &mut [>::Default], ) -> windows_core::Result; } impl IIterator_Vtbl { pub const fn new, const OFFSET: isize>() -> Self { unsafe extern "system" fn Current< T: windows_core::RuntimeType + 'static, Identity: IIterator_Impl, const OFFSET: isize, >( this: *mut core::ffi::c_void, result__: *mut windows_core::AbiType, ) -> windows_core::HRESULT { unsafe { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); match IIterator_Impl::Current(this) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); core::mem::forget(ok__); windows_core::HRESULT(0) } Err(err) => err.into(), } } } unsafe extern "system" fn HasCurrent< T: windows_core::RuntimeType + 'static, Identity: IIterator_Impl, const OFFSET: isize, >( this: *mut core::ffi::c_void, result__: *mut bool, ) -> windows_core::HRESULT { unsafe { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); match IIterator_Impl::HasCurrent(this) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) } Err(err) => err.into(), } } } unsafe extern "system" fn MoveNext< T: windows_core::RuntimeType + 'static, Identity: IIterator_Impl, const OFFSET: isize, >( this: *mut core::ffi::c_void, result__: *mut bool, ) -> windows_core::HRESULT { unsafe { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); match IIterator_Impl::MoveNext(this) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) } Err(err) => err.into(), } } } unsafe extern "system" fn GetMany< T: windows_core::RuntimeType + 'static, Identity: IIterator_Impl, const OFFSET: isize, >( this: *mut core::ffi::c_void, items_array_size: u32, items: *mut T, result__: *mut u32, ) -> windows_core::HRESULT { unsafe { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); match IIterator_Impl::GetMany( this, core::slice::from_raw_parts_mut( core::mem::transmute_copy(&items), items_array_size as usize, ), ) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) } Err(err) => err.into(), } } } Self { base__: windows_core::IInspectable_Vtbl::new::, OFFSET>(), Current: Current::, HasCurrent: HasCurrent::, MoveNext: MoveNext::, GetMany: GetMany::, T: core::marker::PhantomData::, } } pub fn matches(iid: &windows_core::GUID) -> bool { iid == & as windows_core::Interface>::IID } } #[repr(C)] #[doc(hidden)] pub struct IIterator_Vtbl where T: windows_core::RuntimeType + 'static, { pub base__: windows_core::IInspectable_Vtbl, pub Current: unsafe extern "system" fn( *mut core::ffi::c_void, *mut windows_core::AbiType, ) -> windows_core::HRESULT, pub HasCurrent: unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT, pub MoveNext: unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT, pub GetMany: unsafe extern "system" fn( *mut core::ffi::c_void, u32, *mut T, *mut u32, ) -> windows_core::HRESULT, T: core::marker::PhantomData, } impl Iterator for IIterator { type Item = T; fn next(&mut self) -> Option { let result = if self.HasCurrent().unwrap_or(false) { self.Current().ok() } else { None }; if result.is_some() { self.MoveNext().ok()?; } result } } #[repr(transparent)] #[derive(Clone, Debug, Eq, PartialEq)] pub struct IKeyValuePair( windows_core::IUnknown, core::marker::PhantomData, core::marker::PhantomData, ) where K: windows_core::RuntimeType + 'static, V: windows_core::RuntimeType + 'static; impl windows_core::imp::CanInto for IKeyValuePair { } impl windows_core::imp::CanInto for IKeyValuePair { } unsafe impl windows_core::Interface for IKeyValuePair { type Vtable = IKeyValuePair_Vtbl; const IID: windows_core::GUID = windows_core::GUID::from_signature(::SIGNATURE); } impl windows_core::RuntimeType for IKeyValuePair { const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::new() .push_slice(b"pinterface({02b51929-c1c4-4a7e-8940-0312b5c18500}") .push_slice(b";") .push_other(K::SIGNATURE) .push_slice(b";") .push_other(V::SIGNATURE) .push_slice(b")"); } impl IKeyValuePair { pub fn Key(&self) -> windows_core::Result { let this = self; unsafe { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(this).Key)( windows_core::Interface::as_raw(this), &mut result__, ) .and_then(|| windows_core::Type::from_abi(result__)) } } pub fn Value(&self) -> windows_core::Result { let this = self; unsafe { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(this).Value)( windows_core::Interface::as_raw(this), &mut result__, ) .and_then(|| windows_core::Type::from_abi(result__)) } } } impl windows_core::RuntimeName for IKeyValuePair { const NAME: &'static str = "Windows.Foundation.Collections.IKeyValuePair"; } pub trait IKeyValuePair_Impl: windows_core::IUnknownImpl where K: windows_core::RuntimeType + 'static, V: windows_core::RuntimeType + 'static, { fn Key(&self) -> windows_core::Result; fn Value(&self) -> windows_core::Result; } impl IKeyValuePair_Vtbl { pub const fn new, const OFFSET: isize>() -> Self { unsafe extern "system" fn Key< K: windows_core::RuntimeType + 'static, V: windows_core::RuntimeType + 'static, Identity: IKeyValuePair_Impl, const OFFSET: isize, >( this: *mut core::ffi::c_void, result__: *mut windows_core::AbiType, ) -> windows_core::HRESULT { unsafe { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); match IKeyValuePair_Impl::Key(this) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); core::mem::forget(ok__); windows_core::HRESULT(0) } Err(err) => err.into(), } } } unsafe extern "system" fn Value< K: windows_core::RuntimeType + 'static, V: windows_core::RuntimeType + 'static, Identity: IKeyValuePair_Impl, const OFFSET: isize, >( this: *mut core::ffi::c_void, result__: *mut windows_core::AbiType, ) -> windows_core::HRESULT { unsafe { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); match IKeyValuePair_Impl::Value(this) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); core::mem::forget(ok__); windows_core::HRESULT(0) } Err(err) => err.into(), } } } Self { base__: windows_core::IInspectable_Vtbl::new::, OFFSET>(), Key: Key::, Value: Value::, K: core::marker::PhantomData::, V: core::marker::PhantomData::, } } pub fn matches(iid: &windows_core::GUID) -> bool { iid == & as windows_core::Interface>::IID } } #[repr(C)] #[doc(hidden)] pub struct IKeyValuePair_Vtbl where K: windows_core::RuntimeType + 'static, V: windows_core::RuntimeType + 'static, { pub base__: windows_core::IInspectable_Vtbl, pub Key: unsafe extern "system" fn( *mut core::ffi::c_void, *mut windows_core::AbiType, ) -> windows_core::HRESULT, pub Value: unsafe extern "system" fn( *mut core::ffi::c_void, *mut windows_core::AbiType, ) -> windows_core::HRESULT, K: core::marker::PhantomData, V: core::marker::PhantomData, } #[repr(transparent)] #[derive(Clone, Debug, Eq, PartialEq)] pub struct IMap( windows_core::IUnknown, core::marker::PhantomData, core::marker::PhantomData, ) where K: windows_core::RuntimeType + 'static, V: windows_core::RuntimeType + 'static; impl windows_core::imp::CanInto for IMap { } impl windows_core::imp::CanInto for IMap { } unsafe impl windows_core::Interface for IMap { type Vtable = IMap_Vtbl; const IID: windows_core::GUID = windows_core::GUID::from_signature(::SIGNATURE); } impl windows_core::RuntimeType for IMap { const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::new() .push_slice(b"pinterface({3c2925fe-8519-45c1-aa79-197b6718c1c1}") .push_slice(b";") .push_other(K::SIGNATURE) .push_slice(b";") .push_other(V::SIGNATURE) .push_slice(b")"); } impl windows_core::imp::CanInto>> for IMap { const QUERY: bool = true; } impl IMap { pub fn Lookup(&self, key: P0) -> windows_core::Result where P0: windows_core::Param, { let this = self; unsafe { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(this).Lookup)( windows_core::Interface::as_raw(this), key.param().abi(), &mut result__, ) .and_then(|| windows_core::Type::from_abi(result__)) } } pub fn Size(&self) -> windows_core::Result { let this = self; unsafe { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(this).Size)( windows_core::Interface::as_raw(this), &mut result__, ) .map(|| result__) } } pub fn HasKey(&self, key: P0) -> windows_core::Result where P0: windows_core::Param, { let this = self; unsafe { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(this).HasKey)( windows_core::Interface::as_raw(this), key.param().abi(), &mut result__, ) .map(|| result__) } } pub fn GetView(&self) -> windows_core::Result> { let this = self; unsafe { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(this).GetView)( windows_core::Interface::as_raw(this), &mut result__, ) .and_then(|| windows_core::Type::from_abi(result__)) } } pub fn Insert(&self, key: P0, value: P1) -> windows_core::Result where P0: windows_core::Param, P1: windows_core::Param, { let this = self; unsafe { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(this).Insert)( windows_core::Interface::as_raw(this), key.param().abi(), value.param().abi(), &mut result__, ) .map(|| result__) } } pub fn Remove(&self, key: P0) -> windows_core::Result<()> where P0: windows_core::Param, { let this = self; unsafe { (windows_core::Interface::vtable(this).Remove)( windows_core::Interface::as_raw(this), key.param().abi(), ) .ok() } } pub fn Clear(&self) -> windows_core::Result<()> { let this = self; unsafe { (windows_core::Interface::vtable(this).Clear)(windows_core::Interface::as_raw(this)) .ok() } } pub fn First(&self) -> windows_core::Result>> { let this = &windows_core::Interface::cast::>>(self)?; unsafe { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(this).First)( windows_core::Interface::as_raw(this), &mut result__, ) .and_then(|| windows_core::Type::from_abi(result__)) } } } impl IntoIterator for IMap { type Item = IKeyValuePair; type IntoIter = IIterator; fn into_iter(self) -> Self::IntoIter { IntoIterator::into_iter(&self) } } impl IntoIterator for &IMap { type Item = IKeyValuePair; type IntoIter = IIterator; fn into_iter(self) -> Self::IntoIter { self.First().unwrap() } } impl windows_core::RuntimeName for IMap { const NAME: &'static str = "Windows.Foundation.Collections.IMap"; } pub trait IMap_Impl: IIterable_Impl> where K: windows_core::RuntimeType + 'static, V: windows_core::RuntimeType + 'static, { fn Lookup(&self, key: windows_core::Ref) -> windows_core::Result; fn Size(&self) -> windows_core::Result; fn HasKey(&self, key: windows_core::Ref) -> windows_core::Result; fn GetView(&self) -> windows_core::Result>; fn Insert( &self, key: windows_core::Ref, value: windows_core::Ref, ) -> windows_core::Result; fn Remove(&self, key: windows_core::Ref) -> windows_core::Result<()>; fn Clear(&self) -> windows_core::Result<()>; } impl IMap_Vtbl { pub const fn new, const OFFSET: isize>() -> Self { unsafe extern "system" fn Lookup< K: windows_core::RuntimeType + 'static, V: windows_core::RuntimeType + 'static, Identity: IMap_Impl, const OFFSET: isize, >( this: *mut core::ffi::c_void, key: windows_core::AbiType, result__: *mut windows_core::AbiType, ) -> windows_core::HRESULT { unsafe { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); match IMap_Impl::Lookup(this, core::mem::transmute_copy(&key)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); core::mem::forget(ok__); windows_core::HRESULT(0) } Err(err) => err.into(), } } } unsafe extern "system" fn Size< K: windows_core::RuntimeType + 'static, V: windows_core::RuntimeType + 'static, Identity: IMap_Impl, const OFFSET: isize, >( this: *mut core::ffi::c_void, result__: *mut u32, ) -> windows_core::HRESULT { unsafe { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); match IMap_Impl::Size(this) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) } Err(err) => err.into(), } } } unsafe extern "system" fn HasKey< K: windows_core::RuntimeType + 'static, V: windows_core::RuntimeType + 'static, Identity: IMap_Impl, const OFFSET: isize, >( this: *mut core::ffi::c_void, key: windows_core::AbiType, result__: *mut bool, ) -> windows_core::HRESULT { unsafe { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); match IMap_Impl::HasKey(this, core::mem::transmute_copy(&key)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) } Err(err) => err.into(), } } } unsafe extern "system" fn GetView< K: windows_core::RuntimeType + 'static, V: windows_core::RuntimeType + 'static, Identity: IMap_Impl, const OFFSET: isize, >( this: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void, ) -> windows_core::HRESULT { unsafe { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); match IMap_Impl::GetView(this) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); core::mem::forget(ok__); windows_core::HRESULT(0) } Err(err) => err.into(), } } } unsafe extern "system" fn Insert< K: windows_core::RuntimeType + 'static, V: windows_core::RuntimeType + 'static, Identity: IMap_Impl, const OFFSET: isize, >( this: *mut core::ffi::c_void, key: windows_core::AbiType, value: windows_core::AbiType, result__: *mut bool, ) -> windows_core::HRESULT { unsafe { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); match IMap_Impl::Insert( this, core::mem::transmute_copy(&key), core::mem::transmute_copy(&value), ) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) } Err(err) => err.into(), } } } unsafe extern "system" fn Remove< K: windows_core::RuntimeType + 'static, V: windows_core::RuntimeType + 'static, Identity: IMap_Impl, const OFFSET: isize, >( this: *mut core::ffi::c_void, key: windows_core::AbiType, ) -> windows_core::HRESULT { unsafe { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); IMap_Impl::Remove(this, core::mem::transmute_copy(&key)).into() } } unsafe extern "system" fn Clear< K: windows_core::RuntimeType + 'static, V: windows_core::RuntimeType + 'static, Identity: IMap_Impl, const OFFSET: isize, >( this: *mut core::ffi::c_void, ) -> windows_core::HRESULT { unsafe { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); IMap_Impl::Clear(this).into() } } Self { base__: windows_core::IInspectable_Vtbl::new::, OFFSET>(), Lookup: Lookup::, Size: Size::, HasKey: HasKey::, GetView: GetView::, Insert: Insert::, Remove: Remove::, Clear: Clear::, K: core::marker::PhantomData::, V: core::marker::PhantomData::, } } pub fn matches(iid: &windows_core::GUID) -> bool { iid == & as windows_core::Interface>::IID } } #[repr(C)] #[doc(hidden)] pub struct IMap_Vtbl where K: windows_core::RuntimeType + 'static, V: windows_core::RuntimeType + 'static, { pub base__: windows_core::IInspectable_Vtbl, pub Lookup: unsafe extern "system" fn( *mut core::ffi::c_void, windows_core::AbiType, *mut windows_core::AbiType, ) -> windows_core::HRESULT, pub Size: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT, pub HasKey: unsafe extern "system" fn( *mut core::ffi::c_void, windows_core::AbiType, *mut bool, ) -> windows_core::HRESULT, pub GetView: unsafe extern "system" fn( *mut core::ffi::c_void, *mut *mut core::ffi::c_void, ) -> windows_core::HRESULT, pub Insert: unsafe extern "system" fn( *mut core::ffi::c_void, windows_core::AbiType, windows_core::AbiType, *mut bool, ) -> windows_core::HRESULT, pub Remove: unsafe extern "system" fn( *mut core::ffi::c_void, windows_core::AbiType, ) -> windows_core::HRESULT, pub Clear: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, K: core::marker::PhantomData, V: core::marker::PhantomData, } #[repr(transparent)] #[derive(Clone, Debug, Eq, PartialEq)] pub struct IMapView( windows_core::IUnknown, core::marker::PhantomData, core::marker::PhantomData, ) where K: windows_core::RuntimeType + 'static, V: windows_core::RuntimeType + 'static; impl windows_core::imp::CanInto for IMapView { } impl windows_core::imp::CanInto for IMapView { } unsafe impl windows_core::Interface for IMapView { type Vtable = IMapView_Vtbl; const IID: windows_core::GUID = windows_core::GUID::from_signature(::SIGNATURE); } impl windows_core::RuntimeType for IMapView { const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::new() .push_slice(b"pinterface({e480ce40-a338-4ada-adcf-272272e48cb9}") .push_slice(b";") .push_other(K::SIGNATURE) .push_slice(b";") .push_other(V::SIGNATURE) .push_slice(b")"); } impl windows_core::imp::CanInto>> for IMapView { const QUERY: bool = true; } impl IMapView { pub fn Lookup(&self, key: P0) -> windows_core::Result where P0: windows_core::Param, { let this = self; unsafe { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(this).Lookup)( windows_core::Interface::as_raw(this), key.param().abi(), &mut result__, ) .and_then(|| windows_core::Type::from_abi(result__)) } } pub fn Size(&self) -> windows_core::Result { let this = self; unsafe { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(this).Size)( windows_core::Interface::as_raw(this), &mut result__, ) .map(|| result__) } } pub fn HasKey(&self, key: P0) -> windows_core::Result where P0: windows_core::Param, { let this = self; unsafe { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(this).HasKey)( windows_core::Interface::as_raw(this), key.param().abi(), &mut result__, ) .map(|| result__) } } pub fn Split( &self, first: &mut Option>, second: &mut Option>, ) -> windows_core::Result<()> { let this = self; unsafe { (windows_core::Interface::vtable(this).Split)( windows_core::Interface::as_raw(this), first as *mut _ as _, second as *mut _ as _, ) .ok() } } pub fn First(&self) -> windows_core::Result>> { let this = &windows_core::Interface::cast::>>(self)?; unsafe { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(this).First)( windows_core::Interface::as_raw(this), &mut result__, ) .and_then(|| windows_core::Type::from_abi(result__)) } } } impl IntoIterator for IMapView { type Item = IKeyValuePair; type IntoIter = IIterator; fn into_iter(self) -> Self::IntoIter { IntoIterator::into_iter(&self) } } impl IntoIterator for &IMapView { type Item = IKeyValuePair; type IntoIter = IIterator; fn into_iter(self) -> Self::IntoIter { self.First().unwrap() } } impl windows_core::RuntimeName for IMapView { const NAME: &'static str = "Windows.Foundation.Collections.IMapView"; } pub trait IMapView_Impl: IIterable_Impl> where K: windows_core::RuntimeType + 'static, V: windows_core::RuntimeType + 'static, { fn Lookup(&self, key: windows_core::Ref) -> windows_core::Result; fn Size(&self) -> windows_core::Result; fn HasKey(&self, key: windows_core::Ref) -> windows_core::Result; fn Split( &self, first: windows_core::OutRef>, second: windows_core::OutRef>, ) -> windows_core::Result<()>; } impl IMapView_Vtbl { pub const fn new, const OFFSET: isize>() -> Self { unsafe extern "system" fn Lookup< K: windows_core::RuntimeType + 'static, V: windows_core::RuntimeType + 'static, Identity: IMapView_Impl, const OFFSET: isize, >( this: *mut core::ffi::c_void, key: windows_core::AbiType, result__: *mut windows_core::AbiType, ) -> windows_core::HRESULT { unsafe { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); match IMapView_Impl::Lookup(this, core::mem::transmute_copy(&key)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); core::mem::forget(ok__); windows_core::HRESULT(0) } Err(err) => err.into(), } } } unsafe extern "system" fn Size< K: windows_core::RuntimeType + 'static, V: windows_core::RuntimeType + 'static, Identity: IMapView_Impl, const OFFSET: isize, >( this: *mut core::ffi::c_void, result__: *mut u32, ) -> windows_core::HRESULT { unsafe { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); match IMapView_Impl::Size(this) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) } Err(err) => err.into(), } } } unsafe extern "system" fn HasKey< K: windows_core::RuntimeType + 'static, V: windows_core::RuntimeType + 'static, Identity: IMapView_Impl, const OFFSET: isize, >( this: *mut core::ffi::c_void, key: windows_core::AbiType, result__: *mut bool, ) -> windows_core::HRESULT { unsafe { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); match IMapView_Impl::HasKey(this, core::mem::transmute_copy(&key)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) } Err(err) => err.into(), } } } unsafe extern "system" fn Split< K: windows_core::RuntimeType + 'static, V: windows_core::RuntimeType + 'static, Identity: IMapView_Impl, const OFFSET: isize, >( this: *mut core::ffi::c_void, first: *mut *mut core::ffi::c_void, second: *mut *mut core::ffi::c_void, ) -> windows_core::HRESULT { unsafe { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); IMapView_Impl::Split( this, core::mem::transmute_copy(&first), core::mem::transmute_copy(&second), ) .into() } } Self { base__: windows_core::IInspectable_Vtbl::new::, OFFSET>(), Lookup: Lookup::, Size: Size::, HasKey: HasKey::, Split: Split::, K: core::marker::PhantomData::, V: core::marker::PhantomData::, } } pub fn matches(iid: &windows_core::GUID) -> bool { iid == & as windows_core::Interface>::IID } } #[repr(C)] #[doc(hidden)] pub struct IMapView_Vtbl where K: windows_core::RuntimeType + 'static, V: windows_core::RuntimeType + 'static, { pub base__: windows_core::IInspectable_Vtbl, pub Lookup: unsafe extern "system" fn( *mut core::ffi::c_void, windows_core::AbiType, *mut windows_core::AbiType, ) -> windows_core::HRESULT, pub Size: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT, pub HasKey: unsafe extern "system" fn( *mut core::ffi::c_void, windows_core::AbiType, *mut bool, ) -> windows_core::HRESULT, pub Split: unsafe extern "system" fn( *mut core::ffi::c_void, *mut *mut core::ffi::c_void, *mut *mut core::ffi::c_void, ) -> windows_core::HRESULT, K: core::marker::PhantomData, V: core::marker::PhantomData, } #[repr(transparent)] #[derive(Clone, Debug, Eq, PartialEq)] pub struct IVector(windows_core::IUnknown, core::marker::PhantomData) where T: windows_core::RuntimeType + 'static; impl windows_core::imp::CanInto for IVector { } impl windows_core::imp::CanInto for IVector { } unsafe impl windows_core::Interface for IVector { type Vtable = IVector_Vtbl; const IID: windows_core::GUID = windows_core::GUID::from_signature(::SIGNATURE); } impl windows_core::RuntimeType for IVector { const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::new() .push_slice(b"pinterface({913337e9-11a1-4345-a3a2-4e7f956e222d}") .push_slice(b";") .push_other(T::SIGNATURE) .push_slice(b")"); } impl windows_core::imp::CanInto> for IVector { const QUERY: bool = true; } impl IVector { pub fn GetAt(&self, index: u32) -> windows_core::Result { let this = self; unsafe { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(this).GetAt)( windows_core::Interface::as_raw(this), index, &mut result__, ) .and_then(|| windows_core::Type::from_abi(result__)) } } pub fn Size(&self) -> windows_core::Result { let this = self; unsafe { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(this).Size)( windows_core::Interface::as_raw(this), &mut result__, ) .map(|| result__) } } pub fn GetView(&self) -> windows_core::Result> { let this = self; unsafe { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(this).GetView)( windows_core::Interface::as_raw(this), &mut result__, ) .and_then(|| windows_core::Type::from_abi(result__)) } } pub fn IndexOf(&self, value: P0, index: &mut u32) -> windows_core::Result where P0: windows_core::Param, { let this = self; unsafe { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(this).IndexOf)( windows_core::Interface::as_raw(this), value.param().abi(), index, &mut result__, ) .map(|| result__) } } pub fn SetAt(&self, index: u32, value: P1) -> windows_core::Result<()> where P1: windows_core::Param, { let this = self; unsafe { (windows_core::Interface::vtable(this).SetAt)( windows_core::Interface::as_raw(this), index, value.param().abi(), ) .ok() } } pub fn InsertAt(&self, index: u32, value: P1) -> windows_core::Result<()> where P1: windows_core::Param, { let this = self; unsafe { (windows_core::Interface::vtable(this).InsertAt)( windows_core::Interface::as_raw(this), index, value.param().abi(), ) .ok() } } pub fn RemoveAt(&self, index: u32) -> windows_core::Result<()> { let this = self; unsafe { (windows_core::Interface::vtable(this).RemoveAt)( windows_core::Interface::as_raw(this), index, ) .ok() } } pub fn Append(&self, value: P0) -> windows_core::Result<()> where P0: windows_core::Param, { let this = self; unsafe { (windows_core::Interface::vtable(this).Append)( windows_core::Interface::as_raw(this), value.param().abi(), ) .ok() } } pub fn RemoveAtEnd(&self) -> windows_core::Result<()> { let this = self; unsafe { (windows_core::Interface::vtable(this).RemoveAtEnd)(windows_core::Interface::as_raw( this, )) .ok() } } pub fn Clear(&self) -> windows_core::Result<()> { let this = self; unsafe { (windows_core::Interface::vtable(this).Clear)(windows_core::Interface::as_raw(this)) .ok() } } pub fn GetMany( &self, startindex: u32, items: &mut [>::Default], ) -> windows_core::Result { let this = self; unsafe { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(this).GetMany)( windows_core::Interface::as_raw(this), startindex, items.len().try_into().unwrap(), core::mem::transmute_copy(&items), &mut result__, ) .map(|| result__) } } pub fn ReplaceAll( &self, items: &[>::Default], ) -> windows_core::Result<()> { let this = self; unsafe { (windows_core::Interface::vtable(this).ReplaceAll)( windows_core::Interface::as_raw(this), items.len().try_into().unwrap(), core::mem::transmute(items.as_ptr()), ) .ok() } } pub fn First(&self) -> windows_core::Result> { let this = &windows_core::Interface::cast::>(self)?; unsafe { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(this).First)( windows_core::Interface::as_raw(this), &mut result__, ) .and_then(|| windows_core::Type::from_abi(result__)) } } } impl IntoIterator for IVector { type Item = T; type IntoIter = IIterator; fn into_iter(self) -> Self::IntoIter { IntoIterator::into_iter(&self) } } impl IntoIterator for &IVector { type Item = T; type IntoIter = IIterator; fn into_iter(self) -> Self::IntoIter { self.First().unwrap() } } impl windows_core::RuntimeName for IVector { const NAME: &'static str = "Windows.Foundation.Collections.IVector"; } pub trait IVector_Impl: IIterable_Impl where T: windows_core::RuntimeType + 'static, { fn GetAt(&self, index: u32) -> windows_core::Result; fn Size(&self) -> windows_core::Result; fn GetView(&self) -> windows_core::Result>; fn IndexOf(&self, value: windows_core::Ref, index: &mut u32) -> windows_core::Result; fn SetAt(&self, index: u32, value: windows_core::Ref) -> windows_core::Result<()>; fn InsertAt(&self, index: u32, value: windows_core::Ref) -> windows_core::Result<()>; fn RemoveAt(&self, index: u32) -> windows_core::Result<()>; fn Append(&self, value: windows_core::Ref) -> windows_core::Result<()>; fn RemoveAtEnd(&self) -> windows_core::Result<()>; fn Clear(&self) -> windows_core::Result<()>; fn GetMany( &self, startIndex: u32, items: &mut [>::Default], ) -> windows_core::Result; fn ReplaceAll( &self, items: &[>::Default], ) -> windows_core::Result<()>; } impl IVector_Vtbl { pub const fn new, const OFFSET: isize>() -> Self { unsafe extern "system" fn GetAt< T: windows_core::RuntimeType + 'static, Identity: IVector_Impl, const OFFSET: isize, >( this: *mut core::ffi::c_void, index: u32, result__: *mut windows_core::AbiType, ) -> windows_core::HRESULT { unsafe { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); match IVector_Impl::GetAt(this, index) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); core::mem::forget(ok__); windows_core::HRESULT(0) } Err(err) => err.into(), } } } unsafe extern "system" fn Size< T: windows_core::RuntimeType + 'static, Identity: IVector_Impl, const OFFSET: isize, >( this: *mut core::ffi::c_void, result__: *mut u32, ) -> windows_core::HRESULT { unsafe { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); match IVector_Impl::Size(this) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) } Err(err) => err.into(), } } } unsafe extern "system" fn GetView< T: windows_core::RuntimeType + 'static, Identity: IVector_Impl, const OFFSET: isize, >( this: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void, ) -> windows_core::HRESULT { unsafe { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); match IVector_Impl::GetView(this) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); core::mem::forget(ok__); windows_core::HRESULT(0) } Err(err) => err.into(), } } } unsafe extern "system" fn IndexOf< T: windows_core::RuntimeType + 'static, Identity: IVector_Impl, const OFFSET: isize, >( this: *mut core::ffi::c_void, value: windows_core::AbiType, index: *mut u32, result__: *mut bool, ) -> windows_core::HRESULT { unsafe { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); match IVector_Impl::IndexOf( this, core::mem::transmute_copy(&value), core::mem::transmute_copy(&index), ) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) } Err(err) => err.into(), } } } unsafe extern "system" fn SetAt< T: windows_core::RuntimeType + 'static, Identity: IVector_Impl, const OFFSET: isize, >( this: *mut core::ffi::c_void, index: u32, value: windows_core::AbiType, ) -> windows_core::HRESULT { unsafe { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); IVector_Impl::SetAt(this, index, core::mem::transmute_copy(&value)).into() } } unsafe extern "system" fn InsertAt< T: windows_core::RuntimeType + 'static, Identity: IVector_Impl, const OFFSET: isize, >( this: *mut core::ffi::c_void, index: u32, value: windows_core::AbiType, ) -> windows_core::HRESULT { unsafe { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); IVector_Impl::InsertAt(this, index, core::mem::transmute_copy(&value)).into() } } unsafe extern "system" fn RemoveAt< T: windows_core::RuntimeType + 'static, Identity: IVector_Impl, const OFFSET: isize, >( this: *mut core::ffi::c_void, index: u32, ) -> windows_core::HRESULT { unsafe { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); IVector_Impl::RemoveAt(this, index).into() } } unsafe extern "system" fn Append< T: windows_core::RuntimeType + 'static, Identity: IVector_Impl, const OFFSET: isize, >( this: *mut core::ffi::c_void, value: windows_core::AbiType, ) -> windows_core::HRESULT { unsafe { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); IVector_Impl::Append(this, core::mem::transmute_copy(&value)).into() } } unsafe extern "system" fn RemoveAtEnd< T: windows_core::RuntimeType + 'static, Identity: IVector_Impl, const OFFSET: isize, >( this: *mut core::ffi::c_void, ) -> windows_core::HRESULT { unsafe { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); IVector_Impl::RemoveAtEnd(this).into() } } unsafe extern "system" fn Clear< T: windows_core::RuntimeType + 'static, Identity: IVector_Impl, const OFFSET: isize, >( this: *mut core::ffi::c_void, ) -> windows_core::HRESULT { unsafe { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); IVector_Impl::Clear(this).into() } } unsafe extern "system" fn GetMany< T: windows_core::RuntimeType + 'static, Identity: IVector_Impl, const OFFSET: isize, >( this: *mut core::ffi::c_void, startindex: u32, items_array_size: u32, items: *mut T, result__: *mut u32, ) -> windows_core::HRESULT { unsafe { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); match IVector_Impl::GetMany( this, startindex, core::slice::from_raw_parts_mut( core::mem::transmute_copy(&items), items_array_size as usize, ), ) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) } Err(err) => err.into(), } } } unsafe extern "system" fn ReplaceAll< T: windows_core::RuntimeType + 'static, Identity: IVector_Impl, const OFFSET: isize, >( this: *mut core::ffi::c_void, items_array_size: u32, items: *const T, ) -> windows_core::HRESULT { unsafe { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); IVector_Impl::ReplaceAll( this, core::slice::from_raw_parts( core::mem::transmute_copy(&items), items_array_size as usize, ), ) .into() } } Self { base__: windows_core::IInspectable_Vtbl::new::, OFFSET>(), GetAt: GetAt::, Size: Size::, GetView: GetView::, IndexOf: IndexOf::, SetAt: SetAt::, InsertAt: InsertAt::, RemoveAt: RemoveAt::, Append: Append::, RemoveAtEnd: RemoveAtEnd::, Clear: Clear::, GetMany: GetMany::, ReplaceAll: ReplaceAll::, T: core::marker::PhantomData::, } } pub fn matches(iid: &windows_core::GUID) -> bool { iid == & as windows_core::Interface>::IID } } #[repr(C)] #[doc(hidden)] pub struct IVector_Vtbl where T: windows_core::RuntimeType + 'static, { pub base__: windows_core::IInspectable_Vtbl, pub GetAt: unsafe extern "system" fn( *mut core::ffi::c_void, u32, *mut windows_core::AbiType, ) -> windows_core::HRESULT, pub Size: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT, pub GetView: unsafe extern "system" fn( *mut core::ffi::c_void, *mut *mut core::ffi::c_void, ) -> windows_core::HRESULT, pub IndexOf: unsafe extern "system" fn( *mut core::ffi::c_void, windows_core::AbiType, *mut u32, *mut bool, ) -> windows_core::HRESULT, pub SetAt: unsafe extern "system" fn( *mut core::ffi::c_void, u32, windows_core::AbiType, ) -> windows_core::HRESULT, pub InsertAt: unsafe extern "system" fn( *mut core::ffi::c_void, u32, windows_core::AbiType, ) -> windows_core::HRESULT, pub RemoveAt: unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT, pub Append: unsafe extern "system" fn( *mut core::ffi::c_void, windows_core::AbiType, ) -> windows_core::HRESULT, pub RemoveAtEnd: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, pub Clear: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, pub GetMany: unsafe extern "system" fn( *mut core::ffi::c_void, u32, u32, *mut T, *mut u32, ) -> windows_core::HRESULT, pub ReplaceAll: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *const T) -> windows_core::HRESULT, T: core::marker::PhantomData, } #[repr(transparent)] #[derive(Clone, Debug, Eq, PartialEq)] pub struct IVectorView(windows_core::IUnknown, core::marker::PhantomData) where T: windows_core::RuntimeType + 'static; impl windows_core::imp::CanInto for IVectorView { } impl windows_core::imp::CanInto for IVectorView { } unsafe impl windows_core::Interface for IVectorView { type Vtable = IVectorView_Vtbl; const IID: windows_core::GUID = windows_core::GUID::from_signature(::SIGNATURE); } impl windows_core::RuntimeType for IVectorView { const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::new() .push_slice(b"pinterface({bbe1fa4c-b0e3-4583-baef-1f1b2e483e56}") .push_slice(b";") .push_other(T::SIGNATURE) .push_slice(b")"); } impl windows_core::imp::CanInto> for IVectorView { const QUERY: bool = true; } impl IVectorView { pub fn GetAt(&self, index: u32) -> windows_core::Result { let this = self; unsafe { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(this).GetAt)( windows_core::Interface::as_raw(this), index, &mut result__, ) .and_then(|| windows_core::Type::from_abi(result__)) } } pub fn Size(&self) -> windows_core::Result { let this = self; unsafe { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(this).Size)( windows_core::Interface::as_raw(this), &mut result__, ) .map(|| result__) } } pub fn IndexOf(&self, value: P0, index: &mut u32) -> windows_core::Result where P0: windows_core::Param, { let this = self; unsafe { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(this).IndexOf)( windows_core::Interface::as_raw(this), value.param().abi(), index, &mut result__, ) .map(|| result__) } } pub fn GetMany( &self, startindex: u32, items: &mut [>::Default], ) -> windows_core::Result { let this = self; unsafe { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(this).GetMany)( windows_core::Interface::as_raw(this), startindex, items.len().try_into().unwrap(), core::mem::transmute_copy(&items), &mut result__, ) .map(|| result__) } } pub fn First(&self) -> windows_core::Result> { let this = &windows_core::Interface::cast::>(self)?; unsafe { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(this).First)( windows_core::Interface::as_raw(this), &mut result__, ) .and_then(|| windows_core::Type::from_abi(result__)) } } } impl IntoIterator for IVectorView { type Item = T; type IntoIter = IIterator; fn into_iter(self) -> Self::IntoIter { IntoIterator::into_iter(&self) } } impl IntoIterator for &IVectorView { type Item = T; type IntoIter = IIterator; fn into_iter(self) -> Self::IntoIter { self.First().unwrap() } } impl windows_core::RuntimeName for IVectorView { const NAME: &'static str = "Windows.Foundation.Collections.IVectorView"; } pub trait IVectorView_Impl: IIterable_Impl where T: windows_core::RuntimeType + 'static, { fn GetAt(&self, index: u32) -> windows_core::Result; fn Size(&self) -> windows_core::Result; fn IndexOf(&self, value: windows_core::Ref, index: &mut u32) -> windows_core::Result; fn GetMany( &self, startIndex: u32, items: &mut [>::Default], ) -> windows_core::Result; } impl IVectorView_Vtbl { pub const fn new, const OFFSET: isize>() -> Self { unsafe extern "system" fn GetAt< T: windows_core::RuntimeType + 'static, Identity: IVectorView_Impl, const OFFSET: isize, >( this: *mut core::ffi::c_void, index: u32, result__: *mut windows_core::AbiType, ) -> windows_core::HRESULT { unsafe { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); match IVectorView_Impl::GetAt(this, index) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); core::mem::forget(ok__); windows_core::HRESULT(0) } Err(err) => err.into(), } } } unsafe extern "system" fn Size< T: windows_core::RuntimeType + 'static, Identity: IVectorView_Impl, const OFFSET: isize, >( this: *mut core::ffi::c_void, result__: *mut u32, ) -> windows_core::HRESULT { unsafe { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); match IVectorView_Impl::Size(this) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) } Err(err) => err.into(), } } } unsafe extern "system" fn IndexOf< T: windows_core::RuntimeType + 'static, Identity: IVectorView_Impl, const OFFSET: isize, >( this: *mut core::ffi::c_void, value: windows_core::AbiType, index: *mut u32, result__: *mut bool, ) -> windows_core::HRESULT { unsafe { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); match IVectorView_Impl::IndexOf( this, core::mem::transmute_copy(&value), core::mem::transmute_copy(&index), ) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) } Err(err) => err.into(), } } } unsafe extern "system" fn GetMany< T: windows_core::RuntimeType + 'static, Identity: IVectorView_Impl, const OFFSET: isize, >( this: *mut core::ffi::c_void, startindex: u32, items_array_size: u32, items: *mut T, result__: *mut u32, ) -> windows_core::HRESULT { unsafe { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); match IVectorView_Impl::GetMany( this, startindex, core::slice::from_raw_parts_mut( core::mem::transmute_copy(&items), items_array_size as usize, ), ) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) } Err(err) => err.into(), } } } Self { base__: windows_core::IInspectable_Vtbl::new::, OFFSET>(), GetAt: GetAt::, Size: Size::, IndexOf: IndexOf::, GetMany: GetMany::, T: core::marker::PhantomData::, } } pub fn matches(iid: &windows_core::GUID) -> bool { iid == & as windows_core::Interface>::IID } } #[repr(C)] #[doc(hidden)] pub struct IVectorView_Vtbl where T: windows_core::RuntimeType + 'static, { pub base__: windows_core::IInspectable_Vtbl, pub GetAt: unsafe extern "system" fn( *mut core::ffi::c_void, u32, *mut windows_core::AbiType, ) -> windows_core::HRESULT, pub Size: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT, pub IndexOf: unsafe extern "system" fn( *mut core::ffi::c_void, windows_core::AbiType, *mut u32, *mut bool, ) -> windows_core::HRESULT, pub GetMany: unsafe extern "system" fn( *mut core::ffi::c_void, u32, u32, *mut T, *mut u32, ) -> windows_core::HRESULT, T: core::marker::PhantomData, }