pub struct SuggestStoreBuilder(/* private fields */);
Expand description
Builder for SuggestStore
Using a builder is preferred to calling the constructor directly since it’s harder to confuse the data_path and cache_path strings.
Implementations§
Source§impl SuggestStoreBuilder
impl SuggestStoreBuilder
pub fn new() -> SuggestStoreBuilder
pub fn data_path(self: Arc<Self>, path: String) -> Arc<Self>
Sourcepub fn cache_path(self: Arc<Self>, _path: String) -> Arc<Self>
pub fn cache_path(self: Arc<Self>, _path: String) -> Arc<Self>
Deprecated: this is no longer used by the suggest component.
pub fn remote_settings_server( self: Arc<Self>, server: RemoteSettingsServer, ) -> Arc<Self>
pub fn remote_settings_bucket_name( self: Arc<Self>, bucket_name: String, ) -> Arc<Self>
pub fn remote_settings_service( self: Arc<Self>, rs_service: Arc<RemoteSettingsService>, ) -> Arc<Self>
Sourcepub fn load_extension(
self: Arc<Self>,
library: String,
entry_point: Option<String>,
) -> Arc<Self>
pub fn load_extension( self: Arc<Self>, library: String, entry_point: Option<String>, ) -> Arc<Self>
Add an sqlite3 extension to load
library_name should be the name of the library without any extension, for example libmozsqlite3
.
entrypoint should be the entry point, for example sqlite3_fts5_init
. If null
(the default)
entry point will be used (see https://sqlite.org/loadext.html for details).
pub fn build(&self) -> SuggestApiResult<Arc<SuggestStore>>
Trait Implementations§
Source§impl Default for SuggestStoreBuilder
impl Default for SuggestStoreBuilder
Source§impl<UT> LiftRef<UT> for SuggestStoreBuilder
impl<UT> LiftRef<UT> for SuggestStoreBuilder
type LiftType = Arc<SuggestStoreBuilder>
Source§impl<UT> LowerError<UT> for SuggestStoreBuilder
impl<UT> LowerError<UT> for SuggestStoreBuilder
Source§fn lower_error(obj: Self) -> RustBuffer
fn lower_error(obj: Self) -> RustBuffer
Lower this value for scaffolding function return Read more
Source§impl<UT> LowerReturn<UT> for SuggestStoreBuilder
impl<UT> LowerReturn<UT> for SuggestStoreBuilder
Source§type ReturnType = <Arc<SuggestStoreBuilder> as LowerReturn<UniFfiTag>>::ReturnType
type ReturnType = <Arc<SuggestStoreBuilder> as LowerReturn<UniFfiTag>>::ReturnType
The type that should be returned by scaffolding functions for this type. Read more
Source§fn lower_return(obj: Self) -> Result<Self::ReturnType, RustCallError>
fn lower_return(obj: Self) -> Result<Self::ReturnType, RustCallError>
Lower the return value from an scaffolding call Read more
§fn handle_failed_lift(
error: LiftArgsError,
) -> Result<Self::ReturnType, RustCallError>
fn handle_failed_lift( error: LiftArgsError, ) -> Result<Self::ReturnType, RustCallError>
Lower the return value for failed argument lifts Read more
Source§impl<UT> TypeId<UT> for SuggestStoreBuilder
impl<UT> TypeId<UT> for SuggestStoreBuilder
const TYPE_ID_META: MetadataBuffer
Auto Trait Implementations§
impl !Freeze for SuggestStoreBuilder
impl !RefUnwindSafe for SuggestStoreBuilder
impl Send for SuggestStoreBuilder
impl Sync for SuggestStoreBuilder
impl Unpin for SuggestStoreBuilder
impl !UnwindSafe for SuggestStoreBuilder
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<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
Create a new handle for an Arc value Read more
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
Clone a handle Read more
§unsafe fn consume_handle(handle: Handle) -> Arc<T>
unsafe fn consume_handle(handle: Handle) -> Arc<T>
Consume a handle, getting back the initial
Arc<>
Read more