pub struct SearchOptions {
pub limit: Option<usize>,
pub country: Option<String>,
pub language: Option<String>,
pub site_filter: Option<Vec<String>>,
pub exclude_domains: Option<Vec<String>>,
pub time_range: Option<TimeRange>,
}Expand description
Search options for web search.
Fields§
§limit: Option<usize>Maximum number of results to return.
country: Option<String>Country/region code (e.g., “us”, “uk”).
language: Option<String>Language code (e.g., “en”, “es”).
site_filter: Option<Vec<String>>Filter to specific domains.
exclude_domains: Option<Vec<String>>Exclude specific domains.
time_range: Option<TimeRange>Time range filter.
Implementations§
Source§impl SearchOptions
impl SearchOptions
Sourcepub fn with_limit(self, limit: usize) -> Self
pub fn with_limit(self, limit: usize) -> Self
Set maximum number of results.
Sourcepub fn with_country(self, country: impl Into<String>) -> Self
pub fn with_country(self, country: impl Into<String>) -> Self
Set country/region code.
Sourcepub fn with_language(self, language: impl Into<String>) -> Self
pub fn with_language(self, language: impl Into<String>) -> Self
Set language code.
Sourcepub fn with_site_filter(self, domains: Vec<String>) -> Self
pub fn with_site_filter(self, domains: Vec<String>) -> Self
Filter results to specific domains.
Sourcepub fn with_exclude_domains(self, domains: Vec<String>) -> Self
pub fn with_exclude_domains(self, domains: Vec<String>) -> Self
Exclude specific domains from results.
Sourcepub fn with_time_range(self, range: TimeRange) -> Self
pub fn with_time_range(self, range: TimeRange) -> Self
Set time range filter.
Trait Implementations§
Source§impl Clone for SearchOptions
impl Clone for SearchOptions
Source§fn clone(&self) -> SearchOptions
fn clone(&self) -> SearchOptions
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SearchOptions
impl Debug for SearchOptions
Source§impl Default for SearchOptions
impl Default for SearchOptions
Source§fn default() -> SearchOptions
fn default() -> SearchOptions
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for SearchOptions
impl<'de> Deserialize<'de> for SearchOptions
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for SearchOptions
impl RefUnwindSafe for SearchOptions
impl Send for SearchOptions
impl Sync for SearchOptions
impl Unpin for SearchOptions
impl UnsafeUnpin for SearchOptions
impl UnwindSafe for SearchOptions
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