pub struct WebSearchCustomConfig {
pub endpoint: String,
pub method: String,
pub query_param: String,
pub count_param: Option<String>,
pub params: BTreeMap<String, String>,
pub headers: BTreeMap<String, String>,
pub header_env: BTreeMap<String, String>,
pub results_pointer: String,
pub title_pointer: String,
pub url_pointer: String,
pub snippet_pointer: String,
}Expand description
[websearch.custom] — a JSON search API mapped with JSON Pointers.
Fields§
§endpoint: StringRequest URL. The network allowlist applies to its host.
method: StringGET (query string) or POST (JSON body). Default GET.
query_param: StringParameter that carries the query. Default q.
count_param: Option<String>Parameter that carries the result count. Omitted = not sent.
params: BTreeMap<String, String>Extra static parameters sent with every request.
headers: BTreeMap<String, String>Static request headers.
header_env: BTreeMap<String, String>Header name → environment variable that holds its value (never stored).
results_pointer: StringJSON Pointer to the result array. Default /results.
title_pointer: StringJSON Pointer (inside one result) to its title. Default /title.
url_pointer: StringJSON Pointer (inside one result) to its URL. Default /url.
snippet_pointer: StringJSON Pointer (inside one result) to its snippet. Default /snippet.
Trait Implementations§
Source§impl Clone for WebSearchCustomConfig
impl Clone for WebSearchCustomConfig
Source§impl Debug for WebSearchCustomConfig
impl Debug for WebSearchCustomConfig
Source§impl<'de> Deserialize<'de> for WebSearchCustomConfig
impl<'de> Deserialize<'de> for WebSearchCustomConfig
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
impl Eq for WebSearchCustomConfig
Source§impl PartialEq for WebSearchCustomConfig
impl PartialEq for WebSearchCustomConfig
Source§impl Serialize for WebSearchCustomConfig
impl Serialize for WebSearchCustomConfig
impl StructuralPartialEq for WebSearchCustomConfig
Auto Trait Implementations§
impl Freeze for WebSearchCustomConfig
impl RefUnwindSafe for WebSearchCustomConfig
impl Send for WebSearchCustomConfig
impl Sync for WebSearchCustomConfig
impl Unpin for WebSearchCustomConfig
impl UnsafeUnpin for WebSearchCustomConfig
impl UnwindSafe for WebSearchCustomConfig
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more