pub unsafe trait NSFileProviderEnumerationObserver: NSObjectProtocol {
// Provided methods
unsafe fn didEnumerateItems(
&self,
updated_items: &NSArray<ProtocolObject<dyn NSFileProviderItemProtocol>>,
)
where Self: Sized + Message { ... }
unsafe fn finishEnumeratingUpToPage(
&self,
next_page: Option<&NSFileProviderPage>,
)
where Self: Sized + Message { ... }
unsafe fn finishEnumeratingWithError(&self, error: &NSError)
where Self: Sized + Message { ... }
unsafe fn suggestedPageSize(&self) -> NSInteger
where Self: Sized + Message { ... }
}
NSFileProviderEnumerating
only.Expand description
Provided Methods§
unsafe fn didEnumerateItems( &self, updated_items: &NSArray<ProtocolObject<dyn NSFileProviderItemProtocol>>, )
NSFileProviderItem
only.Sourceunsafe fn finishEnumeratingUpToPage(
&self,
next_page: Option<&NSFileProviderPage>,
)
unsafe fn finishEnumeratingUpToPage( &self, next_page: Option<&NSFileProviderPage>, )
Call this method after enumerating a full page of items. If you set a non-nil nextPage, -[NSFileProviderEnumerator enumerateItemsToObserver:startingAtPage:] might be called with nextPage to enumerate more items. This is typically driven by the user scrolling a UIDocumentBrowserViewController presenting a directory containing more child items that would fit in the view.
Page data is limited to 500 bytes. Setting a larger nextPage interrupts the enumeration.
unsafe fn finishEnumeratingWithError(&self, error: &NSError)
Sourceunsafe fn suggestedPageSize(&self) -> NSInteger
unsafe fn suggestedPageSize(&self) -> NSInteger
Size of the page suggested by the system for better performance.
The system will set that property to the value it considers is best suited for the current enumeration. The system can enumerate a container in various cases (container presenter in the UI, file opened in an application, materialization of the folder by the system, …). Each case has its own performance profile.
By taking into account the suggested size, the enumeration will guarantee the best user experience possible. The system enforces a maximum of 100 times the suggested size.