AssetQuery#

pub enum AssetQuery#

A query for searching assets, which can be composed into a tree with and and or.

Variants#

SearchText(String)#

Fuzzy full-text search against title and description.

SubstringMatch(String)#

Case-insensitive substring match against the asset name.

Label(String)#

Filter by label.

Property(String, String)#

Filter by property key and value.

And(Vec<AssetQuery>)#

All sub-queries must match.

Or(Vec<AssetQuery>)#

At least one sub-query must match.

Implementations#

impl AssetQuery
pub fn search_text(text: impl Into<String>) -> Self#
pub fn substring_match(text: impl Into<String>) -> Self#
pub fn label(label: impl Into<String>) -> Self#
pub fn property(key: impl Into<String>, value: impl Into<String>) -> Self#
pub fn and(queries: impl IntoIterator<Item = AssetQuery>) -> Self#
pub fn or(queries: impl IntoIterator<Item = AssetQuery>) -> Self#

Trait implementations#

Derived: Debug, Clone

Auto traits: Send, Sync, Unpin, UnwindSafe, RefUnwindSafe