pub struct ScoutConfig {
pub driver: String,
pub prefix: String,
pub queue: bool,
pub after_commit: bool,
pub soft_delete: bool,
pub identify: bool,
pub chunk_searchable: usize,
pub chunk_unsearchable: usize,
pub options: HashMap<String, Value>,
}Fields§
§driver: String§prefix: String§queue: bool§after_commit: bool§soft_delete: bool§identify: bool§chunk_searchable: usize§chunk_unsearchable: usize§options: HashMap<String, Value>Implementations§
Source§impl ScoutConfig
impl ScoutConfig
pub fn collection() -> Self
pub fn elasticsearch(host: impl Into<String>, api_key: Option<String>) -> Self
pub fn opensearch(host: impl Into<String>, api_key: Option<String>) -> Self
pub fn insert(&mut self, key: impl Into<String>, value: impl Into<Value>)
pub fn get(&self, key: &str) -> Option<&Value>
pub fn index_name(&self, index: &str) -> Result<String>
Trait Implementations§
Source§impl Clone for ScoutConfig
impl Clone for ScoutConfig
Source§fn clone(&self) -> ScoutConfig
fn clone(&self) -> ScoutConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ScoutConfig
impl Debug for ScoutConfig
Source§impl Default for ScoutConfig
impl Default for ScoutConfig
Source§fn default() -> ScoutConfig
fn default() -> ScoutConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ScoutConfig
impl<'de> Deserialize<'de> for ScoutConfig
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 ScoutConfig
impl RefUnwindSafe for ScoutConfig
impl Send for ScoutConfig
impl Sync for ScoutConfig
impl Unpin for ScoutConfig
impl UnsafeUnpin for ScoutConfig
impl UnwindSafe for ScoutConfig
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