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 { ... }
}NSFileProviderSearch only.Expand description
Provided Methods§
unsafe fn didEnumerateSearchResults( &self, search_results: &NSArray<ProtocolObject<dyn NSFileProviderSearchResult>>, )
Sourceunsafe fn finishEnumeratingUpToPage(
&self,
next_page: Option<&NSFileProviderPage>,
)
Available on crate feature NSFileProviderEnumerating only.
unsafe fn finishEnumeratingUpToPage( &self, next_page: Option<&NSFileProviderPage>, )
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.
Sourceunsafe fn finishEnumeratingWithError(&self, error: &NSError)
unsafe fn finishEnumeratingWithError(&self, error: &NSError)
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.
Sourceunsafe fn maximumNumberOfResultsPerPage(&self) -> NSInteger
unsafe fn maximumNumberOfResultsPerPage(&self) -> NSInteger
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.