pub struct JSONEngineUrl {
pub base: Option<String>,
pub method: Option<JSONEngineMethod>,
pub params: Option<Vec<SearchUrlParam>>,
pub search_term_param_name: Option<String>,
pub display_name_map: Option<HashMap<String, String>>,
pub is_new_until: Option<String>,
pub exclude_partner_code_from_telemetry: bool,
pub accepted_content_types: Option<Vec<String>>,
}Expand description
Defines an individual search engine URL. This is defined separately to
types::SearchEngineUrl as various fields may be optional in the supplied
configuration.
Fields§
§base: Option<String>The PrePath and FilePath of the URL. May include variables for engines
which have a variable FilePath, e.g. {searchTerms} for when a search
term is within the path of the url.
method: Option<JSONEngineMethod>The HTTP method to use to send the request (GET or POST).
If the engine definition has not specified the method, it defaults to GET.
params: Option<Vec<SearchUrlParam>>The parameters for this URL.
search_term_param_name: Option<String>The name of the query parameter for the search term. Automatically
appended to the end of the query. This may be skipped if {searchTerms}
is included in the base.
display_name_map: Option<HashMap<String, String>>A map from locale codes to display names of the URL. This is useful if the URL corresponds to a brand name distinct from the engine’s brand name. Since brand names can be localized, this is a map rather than a URL. The client will fall back to the special locale code “default” when its locale is not present in the map.
is_new_until: Option<String>Indicates the date until which the URL is considered new (format: YYYY-MM-DD).
exclude_partner_code_from_telemetry: boolWhether the engine’s partner code should be excluded from telemetry when this URL is visited.
accepted_content_types: Option<Vec<String>>If this URL performs searches only for certain MIME types, they should
be listed here. If this value is None, then it’s assumed the content
type is irrelevant. This field is intended to be used for URLs like
visual search, which might support certain image types and not others.
Consumers can use it to determine whether search UI corresponding to the
URL should be shown to the user in a given context.
Trait Implementations§
Source§impl Clone for JSONEngineUrl
impl Clone for JSONEngineUrl
Source§fn clone(&self) -> JSONEngineUrl
fn clone(&self) -> JSONEngineUrl
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<UT> ConvertError<UT> for JSONEngineUrl
impl<UT> ConvertError<UT> for JSONEngineUrl
fn try_convert_unexpected_callback_error( e: UnexpectedUniFFICallbackError, ) -> Result<Self>
Source§impl Debug for JSONEngineUrl
impl Debug for JSONEngineUrl
Source§impl Default for JSONEngineUrl
impl Default for JSONEngineUrl
Source§fn default() -> JSONEngineUrl
fn default() -> JSONEngineUrl
Source§impl<'de> Deserialize<'de> for JSONEngineUrl
impl<'de> Deserialize<'de> for JSONEngineUrl
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>,
Source§impl<UT> FfiConverter<UT> for JSONEngineUrl
impl<UT> FfiConverter<UT> for JSONEngineUrl
Source§const TYPE_ID_META: MetadataBuffer
const TYPE_ID_META: MetadataBuffer
Source§type FfiType = RustBuffer
type FfiType = RustBuffer
Source§fn lower(v: Self) -> RustBuffer
fn lower(v: Self) -> RustBuffer
Source§fn try_lift(buf: RustBuffer) -> Result<Self>
fn try_lift(buf: RustBuffer) -> Result<Self>
Source§impl<UT> Lift<UT> for JSONEngineUrl
impl<UT> Lift<UT> for JSONEngineUrl
Source§impl<UT> LiftRef<UT> for JSONEngineUrl
impl<UT> LiftRef<UT> for JSONEngineUrl
type LiftType = JSONEngineUrl
Source§impl<UT> LiftReturn<UT> for JSONEngineUrl
impl<UT> LiftReturn<UT> for JSONEngineUrl
Source§type ReturnType = <JSONEngineUrl as Lift<UT>>::FfiType
type ReturnType = <JSONEngineUrl as Lift<UT>>::FfiType
Source§fn try_lift_successful_return(v: Self::ReturnType) -> Result<Self>
fn try_lift_successful_return(v: Self::ReturnType) -> Result<Self>
§fn lift_foreign_return(
ffi_return: Self::ReturnType,
call_status: RustCallStatus,
) -> Self
fn lift_foreign_return( ffi_return: Self::ReturnType, call_status: RustCallStatus, ) -> Self
§fn lift_error(_buf: RustBuffer) -> Self
fn lift_error(_buf: RustBuffer) -> Self
§fn handle_callback_unexpected_error(e: UnexpectedUniFFICallbackError) -> Self
fn handle_callback_unexpected_error(e: UnexpectedUniFFICallbackError) -> Self
Source§impl<UT> Lower<UT> for JSONEngineUrl
impl<UT> Lower<UT> for JSONEngineUrl
Source§impl<UT> LowerError<UT> for JSONEngineUrl
impl<UT> LowerError<UT> for JSONEngineUrl
Source§fn lower_error(obj: Self) -> RustBuffer
fn lower_error(obj: Self) -> RustBuffer
Source§impl<UT> LowerReturn<UT> for JSONEngineUrl
impl<UT> LowerReturn<UT> for JSONEngineUrl
Source§type ReturnType = <JSONEngineUrl as Lower<UT>>::FfiType
type ReturnType = <JSONEngineUrl as Lower<UT>>::FfiType
Source§fn lower_return(v: Self) -> Result<Self::ReturnType, RustCallError>
fn lower_return(v: Self) -> Result<Self::ReturnType, RustCallError>
§fn handle_failed_lift(
error: LiftArgsError,
) -> Result<Self::ReturnType, RustCallError>
fn handle_failed_lift( error: LiftArgsError, ) -> Result<Self::ReturnType, RustCallError>
Source§impl PartialEq for JSONEngineUrl
impl PartialEq for JSONEngineUrl
Source§impl<UT> TypeId<UT> for JSONEngineUrl
impl<UT> TypeId<UT> for JSONEngineUrl
const TYPE_ID_META: MetadataBuffer
impl StructuralPartialEq for JSONEngineUrl
Auto Trait Implementations§
impl Freeze for JSONEngineUrl
impl RefUnwindSafe for JSONEngineUrl
impl Send for JSONEngineUrl
impl Sync for JSONEngineUrl
impl Unpin for JSONEngineUrl
impl UnwindSafe for JSONEngineUrl
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
§unsafe fn consume_handle(handle: Handle) -> Arc<T>
unsafe fn consume_handle(handle: Handle) -> Arc<T>
Arc<> Read more