NSFileProviderSearchEnumerator

Trait NSFileProviderSearchEnumerator 

Source
pub unsafe trait NSFileProviderSearchEnumerator: NSObjectProtocol {
    // Provided methods
    unsafe fn invalidate(&self)
       where Self: Sized + Message { ... }
    unsafe fn enumerateSearchResultsForObserver_startingAtPage(
        &self,
        observer: &ProtocolObject<dyn NSFileProviderSearchEnumerationObserver>,
        page: Option<&NSFileProviderPage>,
    )
       where Self: Sized + Message { ... }
}
Available on crate feature NSFileProviderSearch only.
Expand description

Provided Methods§

Source

unsafe fn invalidate(&self)
where Self: Sized + Message,

Called when the system wants to cancel a currently running enumeration, or when the system is finished using this enumerator object.

For instance, the user has changed their query, and the result of the currently running query will no longer be used by the system.

Or, the system is finished using this enumerator object.

The extension should cancel any outstanding requests and cleanup resources.

Source

unsafe fn enumerateSearchResultsForObserver_startingAtPage( &self, observer: &ProtocolObject<dyn NSFileProviderSearchEnumerationObserver>, page: Option<&NSFileProviderPage>, )
where Self: Sized + Message,

Available on crate feature NSFileProviderEnumerating only.

Enumerate search results starting from the specified page.

  • Parameters:
  • observer: The observer object, which the extension will use to provide results.
  • page: If a previous enumeration returned a nextPage on -[NSFileProviderSearchEnumerationObserver finishEnumeratingUpToPage:], the system may pass that page into the next enumeration. The page should contain whatever information is needed to resume the enumeration.

Trait Implementations§

Source§

impl ProtocolType for dyn NSFileProviderSearchEnumerator

Source§

const NAME: &'static str = "NSFileProviderSearchEnumerator"

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 NSFileProviderSearchEnumerator

Implementations on Foreign Types§

Source§

impl<T> NSFileProviderSearchEnumerator for ProtocolObject<T>

Implementors§