pub struct MDQuery(/* private fields */);Expand description
A wrapper around macOS Spotlight search query API. Provides functionality to create and execute metadata queries.
Implementations§
Source§impl MDQuery
impl MDQuery
Sourcepub fn builder() -> MDQueryBuilder
pub fn builder() -> MDQueryBuilder
Creates a new query builder with default settings.
§Returns
A new MDQueryBuilder instance for configuring the query.
Sourcepub fn new(
query: &str,
scopes: Option<Vec<MDQueryScope>>,
max_count: Option<usize>,
) -> Result<Self>
pub fn new( query: &str, scopes: Option<Vec<MDQueryScope>>, max_count: Option<usize>, ) -> Result<Self>
Creates a new MDQuery with the given query string and optional parameters.
§Parameters
query- A Spotlight query stringscopes- Optional vector of search scopes to limit the querymax_count- Optional maximum number of results to return
§Returns
A Result containing the MDQuery on success, or an error if query creation fails.
Auto Trait Implementations§
impl Freeze for MDQuery
impl RefUnwindSafe for MDQuery
impl Send for MDQuery
impl Sync for MDQuery
impl Unpin for MDQuery
impl UnwindSafe for MDQuery
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more