pub struct LookupQuery {
pub text: String,
pub scope: LookupScope,
pub within: Option<LookupWithin>,
pub locale: Option<String>,
pub limit: usize,
}Expand description
A lookup request.
Fields§
§text: StringThe name or guess to resolve: an OPY spelling, a canonical Workshop id, a Workshop display name, or a settings path prefix. Empty text applies no text constraint and lists the in-scope entries instead of scoring them.
scope: LookupScopeThe namespaces the query searches; LookupScope::ALL is the default.
within selects its own namespace when set.
within: Option<LookupWithin>Restricts the answer to the children of one named scope instead of
searching every candidate in scope.
locale: Option<String>The display-name locale to read; only en-US is supported.
Localized display names remain workshop-rs-owned and are answered
as LookupOutcome::Unsupported, not silently returned in English.
limit: usizeThe maximum number of returned hits; 0 selects DEFAULT_LIMIT.
Implementations§
Source§impl LookupQuery
impl LookupQuery
Sourcepub fn new(text: impl Into<String>) -> LookupQuery
pub fn new(text: impl Into<String>) -> LookupQuery
A query across every namespace.
Trait Implementations§
Source§impl Clone for LookupQuery
impl Clone for LookupQuery
Source§impl Debug for LookupQuery
impl Debug for LookupQuery
Source§impl PartialEq for LookupQuery
impl PartialEq for LookupQuery
impl StructuralPartialEq for LookupQuery
Auto Trait Implementations§
impl Freeze for LookupQuery
impl RefUnwindSafe for LookupQuery
impl Send for LookupQuery
impl Sync for LookupQuery
impl Unpin for LookupQuery
impl UnsafeUnpin for LookupQuery
impl UnwindSafe for LookupQuery
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