NSFileProviderEnumerationObserver

Trait NSFileProviderEnumerationObserver 

Source
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 { ... }
}
Available on crate feature NSFileProviderEnumerating only.
Expand description

Provided Methods§

Source

unsafe fn didEnumerateItems( &self, updated_items: &NSArray<ProtocolObject<dyn NSFileProviderItemProtocol>>, )
where Self: Sized + Message,

Available on crate feature NSFileProviderItem only.
Source

unsafe fn finishEnumeratingUpToPage( &self, next_page: Option<&NSFileProviderPage>, )
where Self: Sized + Message,

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.

Source

unsafe fn finishEnumeratingWithError(&self, error: &NSError)
where Self: Sized + Message,

Source

unsafe fn suggestedPageSize(&self) -> NSInteger
where Self: Sized + Message,

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.

Trait Implementations§

Source§

impl ProtocolType for dyn NSFileProviderEnumerationObserver

Source§

const NAME: &'static str = "NSFileProviderEnumerationObserver"

The name of the Objective-C protocol that this type represents. Read more
Source§

fn protocol() -> Option<&'static AnyProtocol>

Get a reference to the Objective-C protocol object that this type represents. Read more
Source§

impl<T> ImplementedBy<T> for dyn NSFileProviderEnumerationObserver

Implementations on Foreign Types§

Source§

impl<T> NSFileProviderEnumerationObserver for ProtocolObject<T>

Implementors§