| #[doc(hidden)] |
| #[repr(transparent)] |
| pub struct IItemRemovedEventArgs(::windows::core::IUnknown); |
| unsafe impl ::windows::core::Vtable for IItemRemovedEventArgs { |
| type Vtable = IItemRemovedEventArgs_Vtbl; |
| } |
| unsafe impl ::windows::core::Interface for IItemRemovedEventArgs { |
| const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x59677e5c_55be_4c66_ba66_5eaea79d2631); |
| } |
| #[repr(C)] |
| #[doc(hidden)] |
| pub struct IItemRemovedEventArgs_Vtbl { |
| pub base__: ::windows::core::IInspectable_Vtbl, |
| pub RemovedEntry: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut ::core::mem::ManuallyDrop<AccessListEntry>) -> ::windows::core::HRESULT, |
| } |
| #[doc(hidden)] |
| #[repr(transparent)] |
| pub struct IStorageApplicationPermissionsStatics(::windows::core::IUnknown); |
| unsafe impl ::windows::core::Vtable for IStorageApplicationPermissionsStatics { |
| type Vtable = IStorageApplicationPermissionsStatics_Vtbl; |
| } |
| unsafe impl ::windows::core::Interface for IStorageApplicationPermissionsStatics { |
| const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x4391dfaa_d033_48f9_8060_3ec847d2e3f1); |
| } |
| #[repr(C)] |
| #[doc(hidden)] |
| pub struct IStorageApplicationPermissionsStatics_Vtbl { |
| pub base__: ::windows::core::IInspectable_Vtbl, |
| pub FutureAccessList: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT, |
| pub MostRecentlyUsedList: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT, |
| } |
| #[doc(hidden)] |
| #[repr(transparent)] |
| pub struct IStorageApplicationPermissionsStatics2(::windows::core::IUnknown); |
| unsafe impl ::windows::core::Vtable for IStorageApplicationPermissionsStatics2 { |
| type Vtable = IStorageApplicationPermissionsStatics2_Vtbl; |
| } |
| unsafe impl ::windows::core::Interface for IStorageApplicationPermissionsStatics2 { |
| const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x072716ec_aa05_4294_9a11_1a3d04519ad0); |
| } |
| #[repr(C)] |
| #[doc(hidden)] |
| pub struct IStorageApplicationPermissionsStatics2_Vtbl { |
| pub base__: ::windows::core::IInspectable_Vtbl, |
| #[cfg(feature = "System")] |
| pub GetFutureAccessListForUser: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, user: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT, |
| #[cfg(not(feature = "System"))] |
| GetFutureAccessListForUser: usize, |
| #[cfg(feature = "System")] |
| pub GetMostRecentlyUsedListForUser: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, user: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT, |
| #[cfg(not(feature = "System"))] |
| GetMostRecentlyUsedListForUser: usize, |
| } |
| #[doc = "*Required features: `\"Storage_AccessCache\"`*"] |
| #[repr(transparent)] |
| pub struct IStorageItemAccessList(::windows::core::IUnknown); |
| impl IStorageItemAccessList { |
| pub fn AddOverloadDefaultMetadata<'a, P0, E0>(&self, file: P0) -> ::windows::core::Result<::windows::core::HSTRING> |
| where |
| P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::IStorageItem>, Error = E0>, |
| E0: ::std::convert::Into<::windows::core::Error>, |
| { |
| let this = self; |
| unsafe { |
| let mut result__ = ::core::mem::MaybeUninit::zeroed(); |
| (::windows::core::Vtable::vtable(this).AddOverloadDefaultMetadata)(::windows::core::Vtable::as_raw(this), file.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::<::windows::core::HSTRING>(result__) |
| } |
| } |
| pub fn Add<'a, P0, E0>(&self, file: P0, metadata: &::windows::core::HSTRING) -> ::windows::core::Result<::windows::core::HSTRING> |
| where |
| P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::IStorageItem>, Error = E0>, |
| E0: ::std::convert::Into<::windows::core::Error>, |
| { |
| let this = self; |
| unsafe { |
| let mut result__ = ::core::mem::MaybeUninit::zeroed(); |
| (::windows::core::Vtable::vtable(this).Add)(::windows::core::Vtable::as_raw(this), file.try_into().map_err(|e| e.into())?.abi(), ::core::mem::transmute_copy(metadata), result__.as_mut_ptr()).from_abi::<::windows::core::HSTRING>(result__) |
| } |
| } |
| pub fn AddOrReplaceOverloadDefaultMetadata<'a, P0, E0>(&self, token: &::windows::core::HSTRING, file: P0) -> ::windows::core::Result<()> |
| where |
| P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::IStorageItem>, Error = E0>, |
| E0: ::std::convert::Into<::windows::core::Error>, |
| { |
| let this = self; |
| unsafe { (::windows::core::Vtable::vtable(this).AddOrReplaceOverloadDefaultMetadata)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(token), file.try_into().map_err(|e| e.into())?.abi()).ok() } |
| } |
| pub fn AddOrReplace<'a, P0, E0>(&self, token: &::windows::core::HSTRING, file: P0, metadata: &::windows::core::HSTRING) -> ::windows::core::Result<()> |
| where |
| P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::IStorageItem>, Error = E0>, |
| E0: ::std::convert::Into<::windows::core::Error>, |
| { |
| let this = self; |
| unsafe { (::windows::core::Vtable::vtable(this).AddOrReplace)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(token), file.try_into().map_err(|e| e.into())?.abi(), ::core::mem::transmute_copy(metadata)).ok() } |
| } |
| #[doc = "*Required features: `\"Foundation\"`*"] |
| #[cfg(feature = "Foundation")] |
| pub fn GetItemAsync(&self, token: &::windows::core::HSTRING) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<super::IStorageItem>> { |
| let this = self; |
| unsafe { |
| let mut result__ = ::core::mem::MaybeUninit::zeroed(); |
| (::windows::core::Vtable::vtable(this).GetItemAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(token), result__.as_mut_ptr()).from_abi::<super::super::Foundation::IAsyncOperation<super::IStorageItem>>(result__) |
| } |
| } |
| #[doc = "*Required features: `\"Foundation\"`*"] |
| #[cfg(feature = "Foundation")] |
| pub fn GetFileAsync(&self, token: &::windows::core::HSTRING) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<super::StorageFile>> { |
| let this = self; |
| unsafe { |
| let mut result__ = ::core::mem::MaybeUninit::zeroed(); |
| (::windows::core::Vtable::vtable(this).GetFileAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(token), result__.as_mut_ptr()).from_abi::<super::super::Foundation::IAsyncOperation<super::StorageFile>>(result__) |
| } |
| } |
| #[doc = "*Required features: `\"Foundation\"`*"] |
| #[cfg(feature = "Foundation")] |
| pub fn GetFolderAsync(&self, token: &::windows::core::HSTRING) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<super::StorageFolder>> { |
| let this = self; |
| unsafe { |
| let mut result__ = ::core::mem::MaybeUninit::zeroed(); |
| (::windows::core::Vtable::vtable(this).GetFolderAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(token), result__.as_mut_ptr()).from_abi::<super::super::Foundation::IAsyncOperation<super::StorageFolder>>(result__) |
| } |
| } |
| #[doc = "*Required features: `\"Foundation\"`*"] |
| #[cfg(feature = "Foundation")] |
| pub fn GetItemWithOptionsAsync(&self, token: &::windows::core::HSTRING, options: AccessCacheOptions) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<super::IStorageItem>> { |
| let this = self; |
| unsafe { |
| let mut result__ = ::core::mem::MaybeUninit::zeroed(); |
| (::windows::core::Vtable::vtable(this).GetItemWithOptionsAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(token), options, result__.as_mut_ptr()).from_abi::<super::super::Foundation::IAsyncOperation<super::IStorageItem>>(result__) |
| } |
| } |
| #[doc = "*Required features: `\"Foundation\"`*"] |
| #[cfg(feature = "Foundation")] |
| pub fn GetFileWithOptionsAsync(&self, token: &::windows::core::HSTRING, options: AccessCacheOptions) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<super::StorageFile>> { |
| let this = self; |
| unsafe { |
| let mut result__ = ::core::mem::MaybeUninit::zeroed(); |
| (::windows::core::Vtable::vtable(this).GetFileWithOptionsAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(token), options, result__.as_mut_ptr()).from_abi::<super::super::Foundation::IAsyncOperation<super::StorageFile>>(result__) |
| } |
| } |
| #[doc = "*Required features: `\"Foundation\"`*"] |
| #[cfg(feature = "Foundation")] |
| pub fn GetFolderWithOptionsAsync(&self, token: &::windows::core::HSTRING, options: AccessCacheOptions) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<super::StorageFolder>> { |
| let this = self; |
| unsafe { |
| let mut result__ = ::core::mem::MaybeUninit::zeroed(); |
| (::windows::core::Vtable::vtable(this).GetFolderWithOptionsAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(token), options, result__.as_mut_ptr()).from_abi::<super::super::Foundation::IAsyncOperation<super::StorageFolder>>(result__) |
| } |
| } |
| pub fn Remove(&self, token: &::windows::core::HSTRING) -> ::windows::core::Result<()> { |
| let this = self; |
| unsafe { (::windows::core::Vtable::vtable(this).Remove)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(token)).ok() } |
| } |
| pub fn ContainsItem(&self, token: &::windows::core::HSTRING) -> ::windows::core::Result<bool> { |
| let this = self; |
| unsafe { |
| let mut result__ = ::core::mem::MaybeUninit::zeroed(); |
| (::windows::core::Vtable::vtable(this).ContainsItem)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(token), result__.as_mut_ptr()).from_abi::<bool>(result__) |
| } |
| } |
| pub fn Clear(&self) -> ::windows::core::Result<()> { |
| let this = self; |
| unsafe { (::windows::core::Vtable::vtable(this).Clear)(::windows::core::Vtable::as_raw(this)).ok() } |
| } |
| pub fn CheckAccess<'a, P0, E0>(&self, file: P0) -> ::windows::core::Result<bool> |
| where |
| P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::IStorageItem>, Error = E0>, |
| E0: ::std::convert::Into<::windows::core::Error>, |
| { |
| let this = self; |
| unsafe { |
| let mut result__ = ::core::mem::MaybeUninit::zeroed(); |
| (::windows::core::Vtable::vtable(this).CheckAccess)(::windows::core::Vtable::as_raw(this), file.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::<bool>(result__) |
| } |
| } |
| #[doc = "*Required features: `\"Foundation_Collections\"`*"] |
| #[cfg(feature = "Foundation_Collections")] |
| pub fn Entries(&self) -> ::windows::core::Result<AccessListEntryView> { |
| let this = self; |
| unsafe { |
| let mut result__ = ::core::mem::MaybeUninit::zeroed(); |
| (::windows::core::Vtable::vtable(this).Entries)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::<AccessListEntryView>(result__) |
| } |
| } |
| pub fn MaximumItemsAllowed(&self) -> ::windows::core::Result<u32> { |
| let this = self; |
| unsafe { |
| let mut result__ = ::core::mem::MaybeUninit::zeroed(); |
| (::windows::core::Vtable::vtable(this).MaximumItemsAllowed)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::<u32>(result__) |
| } |
| } |
| } |
| ::windows::core::interface_hierarchy!(IStorageItemAccessList, ::windows::core::IUnknown, ::windows::core::IInspectable); |
| impl ::core::clone::Clone for IStorageItemAccessList { |
| fn clone(&self) -> Self { |
| Self(self.0.clone()) |
| } |
| } |
| impl ::core::cmp::PartialEq for IStorageItemAccessList { |
| fn eq(&self, other: &Self) -> bool { |
| self.0 == other.0 |
| } |
| } |
| impl ::core::cmp::Eq for IStorageItemAccessList {} |
| impl ::core::fmt::Debug for IStorageItemAccessList { |
| fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { |
| f.debug_tuple("IStorageItemAccessList").field(&self.0).finish() |
| } |
| } |
| unsafe impl ::windows::core::RuntimeType for IStorageItemAccessList { |
| const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"{2caff6ad-de90-47f5-b2c3-dd36c9fdd453}"); |
| type DefaultType = ::core::option::Option<Self>; |
| fn from_default(from: &Self::DefaultType) -> ::windows::core::Result<Self> { |
| from.as_ref().cloned().ok_or(::windows::core::Error::OK) |
| } |
| } |
| unsafe impl ::windows::core::Vtable for IStorageItemAccessList { |
| type Vtable = IStorageItemAccessList_Vtbl; |
| } |
| unsafe impl ::windows::core::Interface for IStorageItemAccessList { |
| const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x2caff6ad_de90_47f5_b2c3_dd36c9fdd453); |
| } |
| #[repr(C)] |
| #[doc(hidden)] |
| pub struct IStorageItemAccessList_Vtbl { |
| pub base__: ::windows::core::IInspectable_Vtbl, |
| pub AddOverloadDefaultMetadata: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, file: *mut ::core::ffi::c_void, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT, |
| pub Add: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, file: *mut ::core::ffi::c_void, metadata: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT, |
| pub AddOrReplaceOverloadDefaultMetadata: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, token: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, file: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT, |
| pub AddOrReplace: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, token: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, file: *mut ::core::ffi::c_void, metadata: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT, |
| #[cfg(feature = "Foundation")] |
| pub GetItemAsync: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, token: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT, |
| #[cfg(not(feature = "Foundation"))] |
| GetItemAsync: usize, |
| #[cfg(feature = "Foundation")] |
| pub GetFileAsync: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, token: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT, |
| #[cfg(not(feature = "Foundation"))] |
| GetFileAsync: usize, |
| #[cfg(feature = "Foundation")] |
| pub GetFolderAsync: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, token: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT, |
| #[cfg(not(feature = "Foundation"))] |
| GetFolderAsync: usize, |
| #[cfg(feature = "Foundation")] |
| pub GetItemWithOptionsAsync: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, token: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, options: AccessCacheOptions, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT, |
| #[cfg(not(feature = "Foundation"))] |
| GetItemWithOptionsAsync: usize, |
| #[cfg(feature = "Foundation")] |
| pub GetFileWithOptionsAsync: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, token: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, options: AccessCacheOptions, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT, |
| #[cfg(not(feature = "Foundation"))] |
| GetFileWithOptionsAsync: usize, |
| #[cfg(feature = "Foundation")] |
| pub GetFolderWithOptionsAsync: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, token: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, options: AccessCacheOptions, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT, |
| #[cfg(not(feature = "Foundation"))] |
| GetFolderWithOptionsAsync: usize, |
| pub Remove: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, token: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT, |
| pub ContainsItem: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, token: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, result__: *mut bool) -> ::windows::core::HRESULT, |
| pub Clear: unsafe extern "system" fn(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT, |
| pub CheckAccess: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, file: *mut ::core::ffi::c_void, result__: *mut bool) -> ::windows::core::HRESULT, |
| #[cfg(feature = "Foundation_Collections")] |
| pub Entries: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT, |
| #[cfg(not(feature = "Foundation_Collections"))] |
| Entries: usize, |
| pub MaximumItemsAllowed: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut u32) -> ::windows::core::HRESULT, |
| } |
| #[doc(hidden)] |
| #[repr(transparent)] |
| pub struct IStorageItemMostRecentlyUsedList(::windows::core::IUnknown); |
| unsafe impl ::windows::core::Vtable for IStorageItemMostRecentlyUsedList { |
| type Vtable = IStorageItemMostRecentlyUsedList_Vtbl; |
| } |
| unsafe impl ::windows::core::Interface for IStorageItemMostRecentlyUsedList { |
| const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x016239d5_510d_411e_8cf1_c3d1effa4c33); |
| } |
| #[repr(C)] |
| #[doc(hidden)] |
| pub struct IStorageItemMostRecentlyUsedList_Vtbl { |
| pub base__: ::windows::core::IInspectable_Vtbl, |
| #[cfg(feature = "Foundation")] |
| pub ItemRemoved: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, handler: *mut ::core::ffi::c_void, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT, |
| #[cfg(not(feature = "Foundation"))] |
| ItemRemoved: usize, |
| #[cfg(feature = "Foundation")] |
| pub RemoveItemRemoved: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, eventcookie: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT, |
| #[cfg(not(feature = "Foundation"))] |
| RemoveItemRemoved: usize, |
| } |
| #[doc(hidden)] |
| #[repr(transparent)] |
| pub struct IStorageItemMostRecentlyUsedList2(::windows::core::IUnknown); |
| unsafe impl ::windows::core::Vtable for IStorageItemMostRecentlyUsedList2 { |
| type Vtable = IStorageItemMostRecentlyUsedList2_Vtbl; |
| } |
| unsafe impl ::windows::core::Interface for IStorageItemMostRecentlyUsedList2 { |
| const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xda481ea0_ed8d_4731_a1db_e44ee2204093); |
| } |
| #[repr(C)] |
| #[doc(hidden)] |
| pub struct IStorageItemMostRecentlyUsedList2_Vtbl { |
| pub base__: ::windows::core::IInspectable_Vtbl, |
| pub AddWithMetadataAndVisibility: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, file: *mut ::core::ffi::c_void, metadata: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, visibility: RecentStorageItemVisibility, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT, |
| pub AddOrReplaceWithMetadataAndVisibility: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, token: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, file: *mut ::core::ffi::c_void, metadata: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, visibility: RecentStorageItemVisibility) -> ::windows::core::HRESULT, |
| } |
| #[doc = "*Required features: `\"Storage_AccessCache\"`, `\"Foundation_Collections\"`*"] |
| #[cfg(feature = "Foundation_Collections")] |
| #[repr(transparent)] |
| pub struct AccessListEntryView(::windows::core::IUnknown); |
| #[cfg(feature = "Foundation_Collections")] |
| impl AccessListEntryView { |
| #[doc = "*Required features: `\"Foundation_Collections\"`*"] |
| #[cfg(feature = "Foundation_Collections")] |
| pub fn First(&self) -> ::windows::core::Result<super::super::Foundation::Collections::IIterator<AccessListEntry>> { |
| let this = &::windows::core::Interface::cast::<super::super::Foundation::Collections::IIterable<AccessListEntry>>(self)?; |
| unsafe { |
| let mut result__ = ::core::mem::MaybeUninit::zeroed(); |
| (::windows::core::Vtable::vtable(this).First)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::<super::super::Foundation::Collections::IIterator<AccessListEntry>>(result__) |
| } |
| } |
| #[doc = "*Required features: `\"Foundation_Collections\"`*"] |
| #[cfg(feature = "Foundation_Collections")] |
| pub fn GetAt(&self, index: u32) -> ::windows::core::Result<AccessListEntry> { |
| let this = self; |
| unsafe { |
| let mut result__ = ::core::mem::MaybeUninit::zeroed(); |
| (::windows::core::Vtable::vtable(this).GetAt)(::windows::core::Vtable::as_raw(this), index, result__.as_mut_ptr()).from_abi::<AccessListEntry>(result__) |
| } |
| } |
| #[doc = "*Required features: `\"Foundation_Collections\"`*"] |
| #[cfg(feature = "Foundation_Collections")] |
| pub fn Size(&self) -> ::windows::core::Result<u32> { |
| let this = self; |
| unsafe { |
| let mut result__ = ::core::mem::MaybeUninit::zeroed(); |
| (::windows::core::Vtable::vtable(this).Size)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::<u32>(result__) |
| } |
| } |
| #[doc = "*Required features: `\"Foundation_Collections\"`*"] |
| #[cfg(feature = "Foundation_Collections")] |
| pub fn IndexOf<'a, P0>(&self, value: P0, index: &mut u32) -> ::windows::core::Result<bool> |
| where |
| P0: ::std::convert::Into<::windows::core::InParam<'a, AccessListEntry>>, |
| { |
| let this = self; |
| unsafe { |
| let mut result__ = ::core::mem::MaybeUninit::zeroed(); |
| (::windows::core::Vtable::vtable(this).IndexOf)(::windows::core::Vtable::as_raw(this), value.into().abi(), index, result__.as_mut_ptr()).from_abi::<bool>(result__) |
| } |
| } |
| #[doc = "*Required features: `\"Foundation_Collections\"`*"] |
| #[cfg(feature = "Foundation_Collections")] |
| pub fn GetMany(&self, startindex: u32, items: &mut [AccessListEntry]) -> ::windows::core::Result<u32> { |
| let this = self; |
| unsafe { |
| let mut result__ = ::core::mem::MaybeUninit::zeroed(); |
| (::windows::core::Vtable::vtable(this).GetMany)(::windows::core::Vtable::as_raw(this), startindex, items.len() as u32, ::core::mem::transmute_copy(&items), result__.as_mut_ptr()).from_abi::<u32>(result__) |
| } |
| } |
| } |
| #[cfg(feature = "Foundation_Collections")] |
| impl ::core::clone::Clone for AccessListEntryView { |
| fn clone(&self) -> Self { |
| Self(self.0.clone()) |
| } |
| } |
| #[cfg(feature = "Foundation_Collections")] |
| impl ::core::cmp::PartialEq for AccessListEntryView { |
| fn eq(&self, other: &Self) -> bool { |
| self.0 == other.0 |
| } |
| } |
| #[cfg(feature = "Foundation_Collections")] |
| impl ::core::cmp::Eq for AccessListEntryView {} |
| #[cfg(feature = "Foundation_Collections")] |
| impl ::core::fmt::Debug for AccessListEntryView { |
| fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { |
| f.debug_tuple("AccessListEntryView").field(&self.0).finish() |
| } |
| } |
| #[cfg(feature = "Foundation_Collections")] |
| unsafe impl ::windows::core::RuntimeType for AccessListEntryView { |
| const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Storage.AccessCache.AccessListEntryView;pinterface({bbe1fa4c-b0e3-4583-baef-1f1b2e483e56};struct(Windows.Storage.AccessCache.AccessListEntry;string;string)))"); |
| type DefaultType = ::core::option::Option<Self>; |
| fn from_default(from: &Self::DefaultType) -> ::windows::core::Result<Self> { |
| from.as_ref().cloned().ok_or(::windows::core::Error::OK) |
| } |
| } |
| #[cfg(feature = "Foundation_Collections")] |
| unsafe impl ::windows::core::Vtable for AccessListEntryView { |
| type Vtable = super::super::Foundation::Collections::IVectorView_Vtbl<AccessListEntry>; |
| } |
| #[cfg(feature = "Foundation_Collections")] |
| unsafe impl ::windows::core::Interface for AccessListEntryView { |
| const IID: ::windows::core::GUID = <super::super::Foundation::Collections::IVectorView<AccessListEntry> as ::windows::core::Interface>::IID; |
| } |
| #[cfg(feature = "Foundation_Collections")] |
| impl ::windows::core::RuntimeName for AccessListEntryView { |
| const NAME: &'static str = "Windows.Storage.AccessCache.AccessListEntryView"; |
| } |
| #[cfg(feature = "Foundation_Collections")] |
| impl ::core::iter::IntoIterator for AccessListEntryView { |
| type Item = AccessListEntry; |
| type IntoIter = super::super::Foundation::Collections::VectorViewIterator<Self::Item>; |
| fn into_iter(self) -> Self::IntoIter { |
| ::core::iter::IntoIterator::into_iter(&self) |
| } |
| } |
| #[cfg(feature = "Foundation_Collections")] |
| impl ::core::iter::IntoIterator for &AccessListEntryView { |
| type Item = AccessListEntry; |
| type IntoIter = super::super::Foundation::Collections::VectorViewIterator<Self::Item>; |
| fn into_iter(self) -> Self::IntoIter { |
| super::super::Foundation::Collections::VectorViewIterator::new(::core::convert::TryInto::try_into(self).ok()) |
| } |
| } |
| #[cfg(feature = "Foundation_Collections")] |
| ::windows::core::interface_hierarchy!(AccessListEntryView, ::windows::core::IUnknown, ::windows::core::IInspectable); |
| #[cfg(feature = "Foundation_Collections")] |
| impl ::core::convert::TryFrom<AccessListEntryView> for super::super::Foundation::Collections::IIterable<AccessListEntry> { |
| type Error = ::windows::core::Error; |
| fn try_from(value: AccessListEntryView) -> ::windows::core::Result<Self> { |
| ::core::convert::TryFrom::try_from(&value) |
| } |
| } |
| #[cfg(feature = "Foundation_Collections")] |
| impl ::core::convert::TryFrom<&AccessListEntryView> for super::super::Foundation::Collections::IIterable<AccessListEntry> { |
| type Error = ::windows::core::Error; |
| fn try_from(value: &AccessListEntryView) -> ::windows::core::Result<Self> { |
| ::windows::core::Interface::cast(value) |
| } |
| } |
| #[cfg(feature = "Foundation_Collections")] |
| impl<'a> ::core::convert::TryFrom<&AccessListEntryView> for ::windows::core::InParam<'a, super::super::Foundation::Collections::IIterable<AccessListEntry>> { |
| type Error = ::windows::core::Error; |
| fn try_from(value: &AccessListEntryView) -> ::windows::core::Result<Self> { |
| let item = ::std::convert::TryInto::try_into(value)?; |
| Ok(::windows::core::InParam::owned(item)) |
| } |
| } |
| #[cfg(feature = "Foundation_Collections")] |
| impl ::core::convert::TryFrom<AccessListEntryView> for super::super::Foundation::Collections::IVectorView<AccessListEntry> { |
| type Error = ::windows::core::Error; |
| fn try_from(value: AccessListEntryView) -> ::windows::core::Result<Self> { |
| ::core::convert::TryFrom::try_from(&value) |
| } |
| } |
| #[cfg(feature = "Foundation_Collections")] |
| impl ::core::convert::TryFrom<&AccessListEntryView> for super::super::Foundation::Collections::IVectorView<AccessListEntry> { |
| type Error = ::windows::core::Error; |
| fn try_from(value: &AccessListEntryView) -> ::windows::core::Result<Self> { |
| ::windows::core::Interface::cast(value) |
| } |
| } |
| #[cfg(feature = "Foundation_Collections")] |
| impl<'a> ::core::convert::TryFrom<&AccessListEntryView> for ::windows::core::InParam<'a, super::super::Foundation::Collections::IVectorView<AccessListEntry>> { |
| type Error = ::windows::core::Error; |
| fn try_from(value: &AccessListEntryView) -> ::windows::core::Result<Self> { |
| let item = ::std::convert::TryInto::try_into(value)?; |
| Ok(::windows::core::InParam::owned(item)) |
| } |
| } |
| #[doc = "*Required features: `\"Storage_AccessCache\"`*"] |
| #[repr(transparent)] |
| pub struct ItemRemovedEventArgs(::windows::core::IUnknown); |
| impl ItemRemovedEventArgs { |
| pub fn RemovedEntry(&self) -> ::windows::core::Result<AccessListEntry> { |
| let this = self; |
| unsafe { |
| let mut result__ = ::core::mem::MaybeUninit::zeroed(); |
| (::windows::core::Vtable::vtable(this).RemovedEntry)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::<AccessListEntry>(result__) |
| } |
| } |
| } |
| impl ::core::clone::Clone for ItemRemovedEventArgs { |
| fn clone(&self) -> Self { |
| Self(self.0.clone()) |
| } |
| } |
| impl ::core::cmp::PartialEq for ItemRemovedEventArgs { |
| fn eq(&self, other: &Self) -> bool { |
| self.0 == other.0 |
| } |
| } |
| impl ::core::cmp::Eq for ItemRemovedEventArgs {} |
| impl ::core::fmt::Debug for ItemRemovedEventArgs { |
| fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { |
| f.debug_tuple("ItemRemovedEventArgs").field(&self.0).finish() |
| } |
| } |
| unsafe impl ::windows::core::RuntimeType for ItemRemovedEventArgs { |
| const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Storage.AccessCache.ItemRemovedEventArgs;{59677e5c-55be-4c66-ba66-5eaea79d2631})"); |
| type DefaultType = ::core::option::Option<Self>; |
| fn from_default(from: &Self::DefaultType) -> ::windows::core::Result<Self> { |
| from.as_ref().cloned().ok_or(::windows::core::Error::OK) |
| } |
| } |
| unsafe impl ::windows::core::Vtable for ItemRemovedEventArgs { |
| type Vtable = IItemRemovedEventArgs_Vtbl; |
| } |
| unsafe impl ::windows::core::Interface for ItemRemovedEventArgs { |
| const IID: ::windows::core::GUID = <IItemRemovedEventArgs as ::windows::core::Interface>::IID; |
| } |
| impl ::windows::core::RuntimeName for ItemRemovedEventArgs { |
| const NAME: &'static str = "Windows.Storage.AccessCache.ItemRemovedEventArgs"; |
| } |
| ::windows::core::interface_hierarchy!(ItemRemovedEventArgs, ::windows::core::IUnknown, ::windows::core::IInspectable); |
| #[doc = "*Required features: `\"Storage_AccessCache\"`*"] |
| pub struct StorageApplicationPermissions; |
| impl StorageApplicationPermissions { |
| pub fn FutureAccessList() -> ::windows::core::Result<StorageItemAccessList> { |
| Self::IStorageApplicationPermissionsStatics(|this| unsafe { |
| let mut result__ = ::core::mem::MaybeUninit::zeroed(); |
| (::windows::core::Vtable::vtable(this).FutureAccessList)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::<StorageItemAccessList>(result__) |
| }) |
| } |
| pub fn MostRecentlyUsedList() -> ::windows::core::Result<StorageItemMostRecentlyUsedList> { |
| Self::IStorageApplicationPermissionsStatics(|this| unsafe { |
| let mut result__ = ::core::mem::MaybeUninit::zeroed(); |
| (::windows::core::Vtable::vtable(this).MostRecentlyUsedList)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::<StorageItemMostRecentlyUsedList>(result__) |
| }) |
| } |
| #[doc = "*Required features: `\"System\"`*"] |
| #[cfg(feature = "System")] |
| pub fn GetFutureAccessListForUser(user: &super::super::System::User) -> ::windows::core::Result<StorageItemAccessList> { |
| Self::IStorageApplicationPermissionsStatics2(|this| unsafe { |
| let mut result__ = ::core::mem::MaybeUninit::zeroed(); |
| (::windows::core::Vtable::vtable(this).GetFutureAccessListForUser)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), result__.as_mut_ptr()).from_abi::<StorageItemAccessList>(result__) |
| }) |
| } |
| #[doc = "*Required features: `\"System\"`*"] |
| #[cfg(feature = "System")] |
| pub fn GetMostRecentlyUsedListForUser(user: &super::super::System::User) -> ::windows::core::Result<StorageItemMostRecentlyUsedList> { |
| Self::IStorageApplicationPermissionsStatics2(|this| unsafe { |
| let mut result__ = ::core::mem::MaybeUninit::zeroed(); |
| (::windows::core::Vtable::vtable(this).GetMostRecentlyUsedListForUser)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(user), result__.as_mut_ptr()).from_abi::<StorageItemMostRecentlyUsedList>(result__) |
| }) |
| } |
| #[doc(hidden)] |
| pub fn IStorageApplicationPermissionsStatics<R, F: FnOnce(&IStorageApplicationPermissionsStatics) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { |
| static SHARED: ::windows::core::FactoryCache<StorageApplicationPermissions, IStorageApplicationPermissionsStatics> = ::windows::core::FactoryCache::new(); |
| SHARED.call(callback) |
| } |
| #[doc(hidden)] |
| pub fn IStorageApplicationPermissionsStatics2<R, F: FnOnce(&IStorageApplicationPermissionsStatics2) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { |
| static SHARED: ::windows::core::FactoryCache<StorageApplicationPermissions, IStorageApplicationPermissionsStatics2> = ::windows::core::FactoryCache::new(); |
| SHARED.call(callback) |
| } |
| } |
| impl ::windows::core::RuntimeName for StorageApplicationPermissions { |
| const NAME: &'static str = "Windows.Storage.AccessCache.StorageApplicationPermissions"; |
| } |
| #[doc = "*Required features: `\"Storage_AccessCache\"`*"] |
| #[repr(transparent)] |
| pub struct StorageItemAccessList(::windows::core::IUnknown); |
| impl StorageItemAccessList { |
| pub fn AddOverloadDefaultMetadata<'a, P0, E0>(&self, file: P0) -> ::windows::core::Result<::windows::core::HSTRING> |
| where |
| P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::IStorageItem>, Error = E0>, |
| E0: ::std::convert::Into<::windows::core::Error>, |
| { |
| let this = self; |
| unsafe { |
| let mut result__ = ::core::mem::MaybeUninit::zeroed(); |
| (::windows::core::Vtable::vtable(this).AddOverloadDefaultMetadata)(::windows::core::Vtable::as_raw(this), file.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::<::windows::core::HSTRING>(result__) |
| } |
| } |
| pub fn Add<'a, P0, E0>(&self, file: P0, metadata: &::windows::core::HSTRING) -> ::windows::core::Result<::windows::core::HSTRING> |
| where |
| P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::IStorageItem>, Error = E0>, |
| E0: ::std::convert::Into<::windows::core::Error>, |
| { |
| let this = self; |
| unsafe { |
| let mut result__ = ::core::mem::MaybeUninit::zeroed(); |
| (::windows::core::Vtable::vtable(this).Add)(::windows::core::Vtable::as_raw(this), file.try_into().map_err(|e| e.into())?.abi(), ::core::mem::transmute_copy(metadata), result__.as_mut_ptr()).from_abi::<::windows::core::HSTRING>(result__) |
| } |
| } |
| pub fn AddOrReplaceOverloadDefaultMetadata<'a, P0, E0>(&self, token: &::windows::core::HSTRING, file: P0) -> ::windows::core::Result<()> |
| where |
| P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::IStorageItem>, Error = E0>, |
| E0: ::std::convert::Into<::windows::core::Error>, |
| { |
| let this = self; |
| unsafe { (::windows::core::Vtable::vtable(this).AddOrReplaceOverloadDefaultMetadata)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(token), file.try_into().map_err(|e| e.into())?.abi()).ok() } |
| } |
| pub fn AddOrReplace<'a, P0, E0>(&self, token: &::windows::core::HSTRING, file: P0, metadata: &::windows::core::HSTRING) -> ::windows::core::Result<()> |
| where |
| P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::IStorageItem>, Error = E0>, |
| E0: ::std::convert::Into<::windows::core::Error>, |
| { |
| let this = self; |
| unsafe { (::windows::core::Vtable::vtable(this).AddOrReplace)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(token), file.try_into().map_err(|e| e.into())?.abi(), ::core::mem::transmute_copy(metadata)).ok() } |
| } |
| #[doc = "*Required features: `\"Foundation\"`*"] |
| #[cfg(feature = "Foundation")] |
| pub fn GetItemAsync(&self, token: &::windows::core::HSTRING) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<super::IStorageItem>> { |
| let this = self; |
| unsafe { |
| let mut result__ = ::core::mem::MaybeUninit::zeroed(); |
| (::windows::core::Vtable::vtable(this).GetItemAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(token), result__.as_mut_ptr()).from_abi::<super::super::Foundation::IAsyncOperation<super::IStorageItem>>(result__) |
| } |
| } |
| #[doc = "*Required features: `\"Foundation\"`*"] |
| #[cfg(feature = "Foundation")] |
| pub fn GetFileAsync(&self, token: &::windows::core::HSTRING) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<super::StorageFile>> { |
| let this = self; |
| unsafe { |
| let mut result__ = ::core::mem::MaybeUninit::zeroed(); |
| (::windows::core::Vtable::vtable(this).GetFileAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(token), result__.as_mut_ptr()).from_abi::<super::super::Foundation::IAsyncOperation<super::StorageFile>>(result__) |
| } |
| } |
| #[doc = "*Required features: `\"Foundation\"`*"] |
| #[cfg(feature = "Foundation")] |
| pub fn GetFolderAsync(&self, token: &::windows::core::HSTRING) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<super::StorageFolder>> { |
| let this = self; |
| unsafe { |
| let mut result__ = ::core::mem::MaybeUninit::zeroed(); |
| (::windows::core::Vtable::vtable(this).GetFolderAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(token), result__.as_mut_ptr()).from_abi::<super::super::Foundation::IAsyncOperation<super::StorageFolder>>(result__) |
| } |
| } |
| #[doc = "*Required features: `\"Foundation\"`*"] |
| #[cfg(feature = "Foundation")] |
| pub fn GetItemWithOptionsAsync(&self, token: &::windows::core::HSTRING, options: AccessCacheOptions) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<super::IStorageItem>> { |
| let this = self; |
| unsafe { |
| let mut result__ = ::core::mem::MaybeUninit::zeroed(); |
| (::windows::core::Vtable::vtable(this).GetItemWithOptionsAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(token), options, result__.as_mut_ptr()).from_abi::<super::super::Foundation::IAsyncOperation<super::IStorageItem>>(result__) |
| } |
| } |
| #[doc = "*Required features: `\"Foundation\"`*"] |
| #[cfg(feature = "Foundation")] |
| pub fn GetFileWithOptionsAsync(&self, token: &::windows::core::HSTRING, options: AccessCacheOptions) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<super::StorageFile>> { |
| let this = self; |
| unsafe { |
| let mut result__ = ::core::mem::MaybeUninit::zeroed(); |
| (::windows::core::Vtable::vtable(this).GetFileWithOptionsAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(token), options, result__.as_mut_ptr()).from_abi::<super::super::Foundation::IAsyncOperation<super::StorageFile>>(result__) |
| } |
| } |
| #[doc = "*Required features: `\"Foundation\"`*"] |
| #[cfg(feature = "Foundation")] |
| pub fn GetFolderWithOptionsAsync(&self, token: &::windows::core::HSTRING, options: AccessCacheOptions) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<super::StorageFolder>> { |
| let this = self; |
| unsafe { |
| let mut result__ = ::core::mem::MaybeUninit::zeroed(); |
| (::windows::core::Vtable::vtable(this).GetFolderWithOptionsAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(token), options, result__.as_mut_ptr()).from_abi::<super::super::Foundation::IAsyncOperation<super::StorageFolder>>(result__) |
| } |
| } |
| pub fn Remove(&self, token: &::windows::core::HSTRING) -> ::windows::core::Result<()> { |
| let this = self; |
| unsafe { (::windows::core::Vtable::vtable(this).Remove)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(token)).ok() } |
| } |
| pub fn ContainsItem(&self, token: &::windows::core::HSTRING) -> ::windows::core::Result<bool> { |
| let this = self; |
| unsafe { |
| let mut result__ = ::core::mem::MaybeUninit::zeroed(); |
| (::windows::core::Vtable::vtable(this).ContainsItem)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(token), result__.as_mut_ptr()).from_abi::<bool>(result__) |
| } |
| } |
| pub fn Clear(&self) -> ::windows::core::Result<()> { |
| let this = self; |
| unsafe { (::windows::core::Vtable::vtable(this).Clear)(::windows::core::Vtable::as_raw(this)).ok() } |
| } |
| pub fn CheckAccess<'a, P0, E0>(&self, file: P0) -> ::windows::core::Result<bool> |
| where |
| P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::IStorageItem>, Error = E0>, |
| E0: ::std::convert::Into<::windows::core::Error>, |
| { |
| let this = self; |
| unsafe { |
| let mut result__ = ::core::mem::MaybeUninit::zeroed(); |
| (::windows::core::Vtable::vtable(this).CheckAccess)(::windows::core::Vtable::as_raw(this), file.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::<bool>(result__) |
| } |
| } |
| #[doc = "*Required features: `\"Foundation_Collections\"`*"] |
| #[cfg(feature = "Foundation_Collections")] |
| pub fn Entries(&self) -> ::windows::core::Result<AccessListEntryView> { |
| let this = self; |
| unsafe { |
| let mut result__ = ::core::mem::MaybeUninit::zeroed(); |
| (::windows::core::Vtable::vtable(this).Entries)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::<AccessListEntryView>(result__) |
| } |
| } |
| pub fn MaximumItemsAllowed(&self) -> ::windows::core::Result<u32> { |
| let this = self; |
| unsafe { |
| let mut result__ = ::core::mem::MaybeUninit::zeroed(); |
| (::windows::core::Vtable::vtable(this).MaximumItemsAllowed)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::<u32>(result__) |
| } |
| } |
| } |
| impl ::core::clone::Clone for StorageItemAccessList { |
| fn clone(&self) -> Self { |
| Self(self.0.clone()) |
| } |
| } |
| impl ::core::cmp::PartialEq for StorageItemAccessList { |
| fn eq(&self, other: &Self) -> bool { |
| self.0 == other.0 |
| } |
| } |
| impl ::core::cmp::Eq for StorageItemAccessList {} |
| impl ::core::fmt::Debug for StorageItemAccessList { |
| fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { |
| f.debug_tuple("StorageItemAccessList").field(&self.0).finish() |
| } |
| } |
| unsafe impl ::windows::core::RuntimeType for StorageItemAccessList { |
| const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Storage.AccessCache.StorageItemAccessList;{2caff6ad-de90-47f5-b2c3-dd36c9fdd453})"); |
| type DefaultType = ::core::option::Option<Self>; |
| fn from_default(from: &Self::DefaultType) -> ::windows::core::Result<Self> { |
| from.as_ref().cloned().ok_or(::windows::core::Error::OK) |
| } |
| } |
| unsafe impl ::windows::core::Vtable for StorageItemAccessList { |
| type Vtable = IStorageItemAccessList_Vtbl; |
| } |
| unsafe impl ::windows::core::Interface for StorageItemAccessList { |
| const IID: ::windows::core::GUID = <IStorageItemAccessList as ::windows::core::Interface>::IID; |
| } |
| impl ::windows::core::RuntimeName for StorageItemAccessList { |
| const NAME: &'static str = "Windows.Storage.AccessCache.StorageItemAccessList"; |
| } |
| ::windows::core::interface_hierarchy!(StorageItemAccessList, ::windows::core::IUnknown, ::windows::core::IInspectable); |
| impl ::core::convert::TryFrom<StorageItemAccessList> for IStorageItemAccessList { |
| type Error = ::windows::core::Error; |
| fn try_from(value: StorageItemAccessList) -> ::windows::core::Result<Self> { |
| ::core::convert::TryFrom::try_from(&value) |
| } |
| } |
| impl ::core::convert::TryFrom<&StorageItemAccessList> for IStorageItemAccessList { |
| type Error = ::windows::core::Error; |
| fn try_from(value: &StorageItemAccessList) -> ::windows::core::Result<Self> { |
| ::windows::core::Interface::cast(value) |
| } |
| } |
| impl<'a> ::core::convert::TryFrom<&StorageItemAccessList> for ::windows::core::InParam<'a, IStorageItemAccessList> { |
| type Error = ::windows::core::Error; |
| fn try_from(value: &StorageItemAccessList) -> ::windows::core::Result<Self> { |
| let item = ::std::convert::TryInto::try_into(value)?; |
| Ok(::windows::core::InParam::owned(item)) |
| } |
| } |
| #[doc = "*Required features: `\"Storage_AccessCache\"`*"] |
| #[repr(transparent)] |
| pub struct StorageItemMostRecentlyUsedList(::windows::core::IUnknown); |
| impl StorageItemMostRecentlyUsedList { |
| pub fn AddOverloadDefaultMetadata<'a, P0, E0>(&self, file: P0) -> ::windows::core::Result<::windows::core::HSTRING> |
| where |
| P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::IStorageItem>, Error = E0>, |
| E0: ::std::convert::Into<::windows::core::Error>, |
| { |
| let this = &::windows::core::Interface::cast::<IStorageItemAccessList>(self)?; |
| unsafe { |
| let mut result__ = ::core::mem::MaybeUninit::zeroed(); |
| (::windows::core::Vtable::vtable(this).AddOverloadDefaultMetadata)(::windows::core::Vtable::as_raw(this), file.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::<::windows::core::HSTRING>(result__) |
| } |
| } |
| pub fn Add<'a, P0, E0>(&self, file: P0, metadata: &::windows::core::HSTRING) -> ::windows::core::Result<::windows::core::HSTRING> |
| where |
| P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::IStorageItem>, Error = E0>, |
| E0: ::std::convert::Into<::windows::core::Error>, |
| { |
| let this = &::windows::core::Interface::cast::<IStorageItemAccessList>(self)?; |
| unsafe { |
| let mut result__ = ::core::mem::MaybeUninit::zeroed(); |
| (::windows::core::Vtable::vtable(this).Add)(::windows::core::Vtable::as_raw(this), file.try_into().map_err(|e| e.into())?.abi(), ::core::mem::transmute_copy(metadata), result__.as_mut_ptr()).from_abi::<::windows::core::HSTRING>(result__) |
| } |
| } |
| pub fn AddOrReplaceOverloadDefaultMetadata<'a, P0, E0>(&self, token: &::windows::core::HSTRING, file: P0) -> ::windows::core::Result<()> |
| where |
| P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::IStorageItem>, Error = E0>, |
| E0: ::std::convert::Into<::windows::core::Error>, |
| { |
| let this = &::windows::core::Interface::cast::<IStorageItemAccessList>(self)?; |
| unsafe { (::windows::core::Vtable::vtable(this).AddOrReplaceOverloadDefaultMetadata)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(token), file.try_into().map_err(|e| e.into())?.abi()).ok() } |
| } |
| pub fn AddOrReplace<'a, P0, E0>(&self, token: &::windows::core::HSTRING, file: P0, metadata: &::windows::core::HSTRING) -> ::windows::core::Result<()> |
| where |
| P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::IStorageItem>, Error = E0>, |
| E0: ::std::convert::Into<::windows::core::Error>, |
| { |
| let this = &::windows::core::Interface::cast::<IStorageItemAccessList>(self)?; |
| unsafe { (::windows::core::Vtable::vtable(this).AddOrReplace)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(token), file.try_into().map_err(|e| e.into())?.abi(), ::core::mem::transmute_copy(metadata)).ok() } |
| } |
| #[doc = "*Required features: `\"Foundation\"`*"] |
| #[cfg(feature = "Foundation")] |
| pub fn GetItemAsync(&self, token: &::windows::core::HSTRING) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<super::IStorageItem>> { |
| let this = &::windows::core::Interface::cast::<IStorageItemAccessList>(self)?; |
| unsafe { |
| let mut result__ = ::core::mem::MaybeUninit::zeroed(); |
| (::windows::core::Vtable::vtable(this).GetItemAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(token), result__.as_mut_ptr()).from_abi::<super::super::Foundation::IAsyncOperation<super::IStorageItem>>(result__) |
| } |
| } |
| #[doc = "*Required features: `\"Foundation\"`*"] |
| #[cfg(feature = "Foundation")] |
| pub fn GetFileAsync(&self, token: &::windows::core::HSTRING) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<super::StorageFile>> { |
| let this = &::windows::core::Interface::cast::<IStorageItemAccessList>(self)?; |
| unsafe { |
| let mut result__ = ::core::mem::MaybeUninit::zeroed(); |
| (::windows::core::Vtable::vtable(this).GetFileAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(token), result__.as_mut_ptr()).from_abi::<super::super::Foundation::IAsyncOperation<super::StorageFile>>(result__) |
| } |
| } |
| #[doc = "*Required features: `\"Foundation\"`*"] |
| #[cfg(feature = "Foundation")] |
| pub fn GetFolderAsync(&self, token: &::windows::core::HSTRING) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<super::StorageFolder>> { |
| let this = &::windows::core::Interface::cast::<IStorageItemAccessList>(self)?; |
| unsafe { |
| let mut result__ = ::core::mem::MaybeUninit::zeroed(); |
| (::windows::core::Vtable::vtable(this).GetFolderAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(token), result__.as_mut_ptr()).from_abi::<super::super::Foundation::IAsyncOperation<super::StorageFolder>>(result__) |
| } |
| } |
| #[doc = "*Required features: `\"Foundation\"`*"] |
| #[cfg(feature = "Foundation")] |
| pub fn GetItemWithOptionsAsync(&self, token: &::windows::core::HSTRING, options: AccessCacheOptions) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<super::IStorageItem>> { |
| let this = &::windows::core::Interface::cast::<IStorageItemAccessList>(self)?; |
| unsafe { |
| let mut result__ = ::core::mem::MaybeUninit::zeroed(); |
| (::windows::core::Vtable::vtable(this).GetItemWithOptionsAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(token), options, result__.as_mut_ptr()).from_abi::<super::super::Foundation::IAsyncOperation<super::IStorageItem>>(result__) |
| } |
| } |
| #[doc = "*Required features: `\"Foundation\"`*"] |
| #[cfg(feature = "Foundation")] |
| pub fn GetFileWithOptionsAsync(&self, token: &::windows::core::HSTRING, options: AccessCacheOptions) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<super::StorageFile>> { |
| let this = &::windows::core::Interface::cast::<IStorageItemAccessList>(self)?; |
| unsafe { |
| let mut result__ = ::core::mem::MaybeUninit::zeroed(); |
| (::windows::core::Vtable::vtable(this).GetFileWithOptionsAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(token), options, result__.as_mut_ptr()).from_abi::<super::super::Foundation::IAsyncOperation<super::StorageFile>>(result__) |
| } |
| } |
| #[doc = "*Required features: `\"Foundation\"`*"] |
| #[cfg(feature = "Foundation")] |
| pub fn GetFolderWithOptionsAsync(&self, token: &::windows::core::HSTRING, options: AccessCacheOptions) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<super::StorageFolder>> { |
| let this = &::windows::core::Interface::cast::<IStorageItemAccessList>(self)?; |
| unsafe { |
| let mut result__ = ::core::mem::MaybeUninit::zeroed(); |
| (::windows::core::Vtable::vtable(this).GetFolderWithOptionsAsync)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(token), options, result__.as_mut_ptr()).from_abi::<super::super::Foundation::IAsyncOperation<super::StorageFolder>>(result__) |
| } |
| } |
| pub fn Remove(&self, token: &::windows::core::HSTRING) -> ::windows::core::Result<()> { |
| let this = &::windows::core::Interface::cast::<IStorageItemAccessList>(self)?; |
| unsafe { (::windows::core::Vtable::vtable(this).Remove)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(token)).ok() } |
| } |
| pub fn ContainsItem(&self, token: &::windows::core::HSTRING) -> ::windows::core::Result<bool> { |
| let this = &::windows::core::Interface::cast::<IStorageItemAccessList>(self)?; |
| unsafe { |
| let mut result__ = ::core::mem::MaybeUninit::zeroed(); |
| (::windows::core::Vtable::vtable(this).ContainsItem)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(token), result__.as_mut_ptr()).from_abi::<bool>(result__) |
| } |
| } |
| pub fn Clear(&self) -> ::windows::core::Result<()> { |
| let this = &::windows::core::Interface::cast::<IStorageItemAccessList>(self)?; |
| unsafe { (::windows::core::Vtable::vtable(this).Clear)(::windows::core::Vtable::as_raw(this)).ok() } |
| } |
| pub fn CheckAccess<'a, P0, E0>(&self, file: P0) -> ::windows::core::Result<bool> |
| where |
| P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::IStorageItem>, Error = E0>, |
| E0: ::std::convert::Into<::windows::core::Error>, |
| { |
| let this = &::windows::core::Interface::cast::<IStorageItemAccessList>(self)?; |
| unsafe { |
| let mut result__ = ::core::mem::MaybeUninit::zeroed(); |
| (::windows::core::Vtable::vtable(this).CheckAccess)(::windows::core::Vtable::as_raw(this), file.try_into().map_err(|e| e.into())?.abi(), result__.as_mut_ptr()).from_abi::<bool>(result__) |
| } |
| } |
| #[doc = "*Required features: `\"Foundation_Collections\"`*"] |
| #[cfg(feature = "Foundation_Collections")] |
| pub fn Entries(&self) -> ::windows::core::Result<AccessListEntryView> { |
| let this = &::windows::core::Interface::cast::<IStorageItemAccessList>(self)?; |
| unsafe { |
| let mut result__ = ::core::mem::MaybeUninit::zeroed(); |
| (::windows::core::Vtable::vtable(this).Entries)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::<AccessListEntryView>(result__) |
| } |
| } |
| pub fn MaximumItemsAllowed(&self) -> ::windows::core::Result<u32> { |
| let this = &::windows::core::Interface::cast::<IStorageItemAccessList>(self)?; |
| unsafe { |
| let mut result__ = ::core::mem::MaybeUninit::zeroed(); |
| (::windows::core::Vtable::vtable(this).MaximumItemsAllowed)(::windows::core::Vtable::as_raw(this), result__.as_mut_ptr()).from_abi::<u32>(result__) |
| } |
| } |
| #[doc = "*Required features: `\"Foundation\"`*"] |
| #[cfg(feature = "Foundation")] |
| pub fn ItemRemoved(&self, handler: &super::super::Foundation::TypedEventHandler<StorageItemMostRecentlyUsedList, ItemRemovedEventArgs>) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> { |
| let this = self; |
| unsafe { |
| let mut result__ = ::core::mem::MaybeUninit::zeroed(); |
| (::windows::core::Vtable::vtable(this).ItemRemoved)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(handler), result__.as_mut_ptr()).from_abi::<super::super::Foundation::EventRegistrationToken>(result__) |
| } |
| } |
| #[doc = "*Required features: `\"Foundation\"`*"] |
| #[cfg(feature = "Foundation")] |
| pub fn RemoveItemRemoved(&self, eventcookie: super::super::Foundation::EventRegistrationToken) -> ::windows::core::Result<()> { |
| let this = self; |
| unsafe { (::windows::core::Vtable::vtable(this).RemoveItemRemoved)(::windows::core::Vtable::as_raw(this), eventcookie).ok() } |
| } |
| pub fn AddWithMetadataAndVisibility<'a, P0, E0>(&self, file: P0, metadata: &::windows::core::HSTRING, visibility: RecentStorageItemVisibility) -> ::windows::core::Result<::windows::core::HSTRING> |
| where |
| P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::IStorageItem>, Error = E0>, |
| E0: ::std::convert::Into<::windows::core::Error>, |
| { |
| let this = &::windows::core::Interface::cast::<IStorageItemMostRecentlyUsedList2>(self)?; |
| unsafe { |
| let mut result__ = ::core::mem::MaybeUninit::zeroed(); |
| (::windows::core::Vtable::vtable(this).AddWithMetadataAndVisibility)(::windows::core::Vtable::as_raw(this), file.try_into().map_err(|e| e.into())?.abi(), ::core::mem::transmute_copy(metadata), visibility, result__.as_mut_ptr()).from_abi::<::windows::core::HSTRING>(result__) |
| } |
| } |
| pub fn AddOrReplaceWithMetadataAndVisibility<'a, P0, E0>(&self, token: &::windows::core::HSTRING, file: P0, metadata: &::windows::core::HSTRING, visibility: RecentStorageItemVisibility) -> ::windows::core::Result<()> |
| where |
| P0: ::std::convert::TryInto<::windows::core::InParam<'a, super::IStorageItem>, Error = E0>, |
| E0: ::std::convert::Into<::windows::core::Error>, |
| { |
| let this = &::windows::core::Interface::cast::<IStorageItemMostRecentlyUsedList2>(self)?; |
| unsafe { (::windows::core::Vtable::vtable(this).AddOrReplaceWithMetadataAndVisibility)(::windows::core::Vtable::as_raw(this), ::core::mem::transmute_copy(token), file.try_into().map_err(|e| e.into())?.abi(), ::core::mem::transmute_copy(metadata), visibility).ok() } |
| } |
| } |
| impl ::core::clone::Clone for StorageItemMostRecentlyUsedList { |
| fn clone(&self) -> Self { |
| Self(self.0.clone()) |
| } |
| } |
| impl ::core::cmp::PartialEq for StorageItemMostRecentlyUsedList { |
| fn eq(&self, other: &Self) -> bool { |
| self.0 == other.0 |
| } |
| } |
| impl ::core::cmp::Eq for StorageItemMostRecentlyUsedList {} |
| impl ::core::fmt::Debug for StorageItemMostRecentlyUsedList { |
| fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { |
| f.debug_tuple("StorageItemMostRecentlyUsedList").field(&self.0).finish() |
| } |
| } |
| unsafe impl ::windows::core::RuntimeType for StorageItemMostRecentlyUsedList { |
| const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Storage.AccessCache.StorageItemMostRecentlyUsedList;{016239d5-510d-411e-8cf1-c3d1effa4c33})"); |
| type DefaultType = ::core::option::Option<Self>; |
| fn from_default(from: &Self::DefaultType) -> ::windows::core::Result<Self> { |
| from.as_ref().cloned().ok_or(::windows::core::Error::OK) |
| } |
| } |
| unsafe impl ::windows::core::Vtable for StorageItemMostRecentlyUsedList { |
| type Vtable = IStorageItemMostRecentlyUsedList_Vtbl; |
| } |
| unsafe impl ::windows::core::Interface for StorageItemMostRecentlyUsedList { |
| const IID: ::windows::core::GUID = <IStorageItemMostRecentlyUsedList as ::windows::core::Interface>::IID; |
| } |
| impl ::windows::core::RuntimeName for StorageItemMostRecentlyUsedList { |
| const NAME: &'static str = "Windows.Storage.AccessCache.StorageItemMostRecentlyUsedList"; |
| } |
| ::windows::core::interface_hierarchy!(StorageItemMostRecentlyUsedList, ::windows::core::IUnknown, ::windows::core::IInspectable); |
| impl ::core::convert::TryFrom<StorageItemMostRecentlyUsedList> for IStorageItemAccessList { |
| type Error = ::windows::core::Error; |
| fn try_from(value: StorageItemMostRecentlyUsedList) -> ::windows::core::Result<Self> { |
| ::core::convert::TryFrom::try_from(&value) |
| } |
| } |
| impl ::core::convert::TryFrom<&StorageItemMostRecentlyUsedList> for IStorageItemAccessList { |
| type Error = ::windows::core::Error; |
| fn try_from(value: &StorageItemMostRecentlyUsedList) -> ::windows::core::Result<Self> { |
| ::windows::core::Interface::cast(value) |
| } |
| } |
| impl<'a> ::core::convert::TryFrom<&StorageItemMostRecentlyUsedList> for ::windows::core::InParam<'a, IStorageItemAccessList> { |
| type Error = ::windows::core::Error; |
| fn try_from(value: &StorageItemMostRecentlyUsedList) -> ::windows::core::Result<Self> { |
| let item = ::std::convert::TryInto::try_into(value)?; |
| Ok(::windows::core::InParam::owned(item)) |
| } |
| } |
| #[doc = "*Required features: `\"Storage_AccessCache\"`*"] |
| #[repr(transparent)] |
| #[derive(::core::cmp::PartialEq, ::core::cmp::Eq)] |
| pub struct AccessCacheOptions(pub u32); |
| impl AccessCacheOptions { |
| pub const None: Self = Self(0u32); |
| pub const DisallowUserInput: Self = Self(1u32); |
| pub const FastLocationsOnly: Self = Self(2u32); |
| pub const UseReadOnlyCachedCopy: Self = Self(4u32); |
| pub const SuppressAccessTimeUpdate: Self = Self(8u32); |
| } |
| impl ::core::marker::Copy for AccessCacheOptions {} |
| impl ::core::clone::Clone for AccessCacheOptions { |
| fn clone(&self) -> Self { |
| *self |
| } |
| } |
| impl ::core::default::Default for AccessCacheOptions { |
| fn default() -> Self { |
| Self(0) |
| } |
| } |
| unsafe impl ::windows::core::Abi for AccessCacheOptions { |
| type Abi = Self; |
| } |
| impl ::core::fmt::Debug for AccessCacheOptions { |
| fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { |
| f.debug_tuple("AccessCacheOptions").field(&self.0).finish() |
| } |
| } |
| impl ::core::ops::BitOr for AccessCacheOptions { |
| type Output = Self; |
| fn bitor(self, other: Self) -> Self { |
| Self(self.0 | other.0) |
| } |
| } |
| impl ::core::ops::BitAnd for AccessCacheOptions { |
| type Output = Self; |
| fn bitand(self, other: Self) -> Self { |
| Self(self.0 & other.0) |
| } |
| } |
| impl ::core::ops::BitOrAssign for AccessCacheOptions { |
| fn bitor_assign(&mut self, other: Self) { |
| self.0.bitor_assign(other.0) |
| } |
| } |
| impl ::core::ops::BitAndAssign for AccessCacheOptions { |
| fn bitand_assign(&mut self, other: Self) { |
| self.0.bitand_assign(other.0) |
| } |
| } |
| impl ::core::ops::Not for AccessCacheOptions { |
| type Output = Self; |
| fn not(self) -> Self { |
| Self(self.0.not()) |
| } |
| } |
| unsafe impl ::windows::core::RuntimeType for AccessCacheOptions { |
| const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.Storage.AccessCache.AccessCacheOptions;u4)"); |
| type DefaultType = Self; |
| fn from_default(from: &Self::DefaultType) -> ::windows::core::Result<Self> { |
| Ok(*from) |
| } |
| } |
| #[doc = "*Required features: `\"Storage_AccessCache\"`*"] |
| #[repr(transparent)] |
| #[derive(::core::cmp::PartialEq, ::core::cmp::Eq)] |
| pub struct RecentStorageItemVisibility(pub i32); |
| impl RecentStorageItemVisibility { |
| pub const AppOnly: Self = Self(0i32); |
| pub const AppAndSystem: Self = Self(1i32); |
| } |
| impl ::core::marker::Copy for RecentStorageItemVisibility {} |
| impl ::core::clone::Clone for RecentStorageItemVisibility { |
| fn clone(&self) -> Self { |
| *self |
| } |
| } |
| impl ::core::default::Default for RecentStorageItemVisibility { |
| fn default() -> Self { |
| Self(0) |
| } |
| } |
| unsafe impl ::windows::core::Abi for RecentStorageItemVisibility { |
| type Abi = Self; |
| } |
| impl ::core::fmt::Debug for RecentStorageItemVisibility { |
| fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { |
| f.debug_tuple("RecentStorageItemVisibility").field(&self.0).finish() |
| } |
| } |
| unsafe impl ::windows::core::RuntimeType for RecentStorageItemVisibility { |
| const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.Storage.AccessCache.RecentStorageItemVisibility;i4)"); |
| type DefaultType = Self; |
| fn from_default(from: &Self::DefaultType) -> ::windows::core::Result<Self> { |
| Ok(*from) |
| } |
| } |
| #[repr(C)] |
| #[doc = "*Required features: `\"Storage_AccessCache\"`*"] |
| pub struct AccessListEntry { |
| pub Token: ::windows::core::HSTRING, |
| pub Metadata: ::windows::core::HSTRING, |
| } |
| impl ::core::clone::Clone for AccessListEntry { |
| fn clone(&self) -> Self { |
| Self { Token: self.Token.clone(), Metadata: self.Metadata.clone() } |
| } |
| } |
| impl ::core::fmt::Debug for AccessListEntry { |
| fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { |
| f.debug_struct("AccessListEntry").field("Token", &self.Token).field("Metadata", &self.Metadata).finish() |
| } |
| } |
| unsafe impl ::windows::core::Abi for AccessListEntry { |
| type Abi = ::core::mem::ManuallyDrop<Self>; |
| } |
| unsafe impl ::windows::core::RuntimeType for AccessListEntry { |
| const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"struct(Windows.Storage.AccessCache.AccessListEntry;string;string)"); |
| type DefaultType = Self; |
| fn from_default(from: &Self::DefaultType) -> ::windows::core::Result<Self> { |
| Ok(from.clone()) |
| } |
| } |
| impl ::core::cmp::PartialEq for AccessListEntry { |
| fn eq(&self, other: &Self) -> bool { |
| self.Token == other.Token && self.Metadata == other.Metadata |
| } |
| } |
| impl ::core::cmp::Eq for AccessListEntry {} |
| impl ::core::default::Default for AccessListEntry { |
| fn default() -> Self { |
| unsafe { ::core::mem::zeroed() } |
| } |
| } |
| #[cfg(feature = "implement")] |
| ::core::include!("impl.rs"); |