pub struct SearchQuery(/* private fields */);Expand description
Validated search query string.
Implementations§
Source§impl SearchQuery
impl SearchQuery
Sourcepub fn parse(query: &str, allow_empty: bool) -> AppResult<Self>
pub fn parse(query: &str, allow_empty: bool) -> AppResult<Self>
Parses a search query.
When allow_empty is true, whitespace-only becomes an empty query (list-all).
§Errors
Returns crate::error::ErrorKind::InvalidInput when the query is empty without
allow_empty, or when it exceeds the maximum length.
Trait Implementations§
Source§impl AsRef<str> for SearchQuery
impl AsRef<str> for SearchQuery
Source§impl Clone for SearchQuery
impl Clone for SearchQuery
Source§impl Debug for SearchQuery
impl Debug for SearchQuery
Source§impl Display for SearchQuery
impl Display for SearchQuery
impl Eq for SearchQuery
Source§impl Hash for SearchQuery
impl Hash for SearchQuery
Source§impl PartialEq for SearchQuery
impl PartialEq for SearchQuery
impl StructuralPartialEq for SearchQuery
Auto Trait Implementations§
impl Freeze for SearchQuery
impl RefUnwindSafe for SearchQuery
impl Send for SearchQuery
impl Sync for SearchQuery
impl Unpin for SearchQuery
impl UnsafeUnpin for SearchQuery
impl UnwindSafe for SearchQuery
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.