pub struct SearchInput {
pub query: String,
pub limit: Option<usize>,
pub offset: Option<usize>,
}Expand description
Input for web search operations
Fields§
§query: StringSearch query string
limit: Option<usize>Maximum number of results to return (default: 10, max: 100)
offset: Option<usize>Offset for pagination (default: 0)
Implementations§
Source§impl SearchInput
impl SearchInput
Sourcepub fn with_limit(self, limit: usize) -> Self
pub fn with_limit(self, limit: usize) -> Self
Set the result limit
Sourcepub fn with_offset(self, offset: usize) -> Self
pub fn with_offset(self, offset: usize) -> Self
Set the pagination offset
Sourcepub fn get_offset(&self) -> usize
pub fn get_offset(&self) -> usize
Get the effective offset
Trait Implementations§
Source§impl Clone for SearchInput
impl Clone for SearchInput
Source§fn clone(&self) -> SearchInput
fn clone(&self) -> SearchInput
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 SearchInput
impl Debug for SearchInput
Source§impl<'de> Deserialize<'de> for SearchInput
impl<'de> Deserialize<'de> for SearchInput
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 SearchInput
impl RefUnwindSafe for SearchInput
impl Send for SearchInput
impl Sync for SearchInput
impl Unpin for SearchInput
impl UnwindSafe for SearchInput
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