NSFileProviderSearchEnumerationObserver

Trait NSFileProviderSearchEnumerationObserver 

Source
pub unsafe trait NSFileProviderSearchEnumerationObserver: NSObjectProtocol {
    // Provided methods
    unsafe fn didEnumerateSearchResults(
        &self,
        search_results: &NSArray<ProtocolObject<dyn NSFileProviderSearchResult>>,
    )
       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 maximumNumberOfResultsPerPage(&self) -> NSInteger
       where Self: Sized + Message { ... }
}
Available on crate feature NSFileProviderSearch only.
Expand description

Provided Methods§

Source

unsafe fn didEnumerateSearchResults( &self, search_results: &NSArray<ProtocolObject<dyn NSFileProviderSearchResult>>, )
where Self: Sized + Message,

Source

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

Available on crate feature NSFileProviderEnumerating only.

Call this method after enumerating a full page of results. If you set a non-nil nextPage, -[NSFileProviderSearchEnumerator enumerateSearchResultsToObserver:startingAtPage:] might be called with nextPage to enumerate more items.

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,

Finishing a search enumeration with an error will cause the system to stop requesting additional pages of results. The system will not retry in case of an error. It is up to the extension to decide whether to retry errors internally, in their implementation of enumerateSearchResultsForObserver, or to return the error to the system and end the search query.

Source

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

The maximum number of results to return in a single page enumeration.

If the extension returns more than this number of results in a single page enumeration, the system will crash the extension process.

Trait Implementations§

Source§

impl ProtocolType for dyn NSFileProviderSearchEnumerationObserver

Source§

const NAME: &'static str = "NSFileProviderSearchEnumerationObserver"

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 NSFileProviderSearchEnumerationObserver

Implementations on Foreign Types§

Source§

impl<T> NSFileProviderSearchEnumerationObserver for ProtocolObject<T>

Implementors§