pub struct SearchRequest { /* private fields */ }Expand description
Bounded provider-neutral request passed to a client search backend.
Implementations§
Source§impl SearchRequest
impl SearchRequest
Sourcepub fn new<I, S, J, T>(
query: impl Into<String>,
allowed_domains: I,
blocked_domains: J,
limit: usize,
) -> Result<Self, SearchRequestError>
pub fn new<I, S, J, T>( query: impl Into<String>, allowed_domains: I, blocked_domains: J, limit: usize, ) -> Result<Self, SearchRequestError>
Creates and validates one client search request.
§Errors
Rejects invalid queries, conflicting domain filters, and result limits
outside 1..=20.
Sourcepub fn from_options(
query: impl Into<String>,
options: WebSearchOptions,
limit: usize,
) -> Result<Self, SearchRequestError>
pub fn from_options( query: impl Into<String>, options: WebSearchOptions, limit: usize, ) -> Result<Self, SearchRequestError>
Creates a request from the complete validated portable search options.
This constructor preserves optional location data for client backends that can implement location-aware search without changing the provider port.
§Errors
Rejects invalid queries and result limits outside 1..=20.
Sourcepub fn allowed_domains(&self) -> &[String]
pub fn allowed_domains(&self) -> &[String]
Returns the deterministic domain allowlist.
Sourcepub fn blocked_domains(&self) -> &[String]
pub fn blocked_domains(&self) -> &[String]
Returns the deterministic domain blocklist.
Sourcepub const fn location(&self) -> Option<&WebSearchLocation>
pub const fn location(&self) -> Option<&WebSearchLocation>
Returns the optional approximate location for capable client backends.
Trait Implementations§
Source§impl Clone for SearchRequest
impl Clone for SearchRequest
Source§impl Debug for SearchRequest
impl Debug for SearchRequest
impl Eq for SearchRequest
Source§impl PartialEq for SearchRequest
impl PartialEq for SearchRequest
impl StructuralPartialEq for SearchRequest
Auto Trait Implementations§
impl Freeze for SearchRequest
impl RefUnwindSafe for SearchRequest
impl Send for SearchRequest
impl Sync for SearchRequest
impl Unpin for SearchRequest
impl UnsafeUnpin for SearchRequest
impl UnwindSafe for SearchRequest
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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.