pub struct SchemaBuilder { /* private fields */ }Expand description
Builder for Schema
Implementations§
Source§impl SchemaBuilder
impl SchemaBuilder
pub fn add_text_field( &mut self, name: &str, indexed: bool, stored: bool, ) -> Field
pub fn add_text_field_with_tokenizer( &mut self, name: &str, indexed: bool, stored: bool, tokenizer: &str, ) -> Field
pub fn add_u64_field( &mut self, name: &str, indexed: bool, stored: bool, ) -> Field
pub fn add_i64_field( &mut self, name: &str, indexed: bool, stored: bool, ) -> Field
pub fn add_f64_field( &mut self, name: &str, indexed: bool, stored: bool, ) -> Field
pub fn add_bytes_field(&mut self, name: &str, stored: bool) -> Field
Sourcepub fn set_multi(&mut self, field: Field, multi: bool)
pub fn set_multi(&mut self, field: Field, multi: bool)
Set the multi attribute on the last added field
Sourcepub fn set_default_fields(&mut self, field_names: Vec<String>)
pub fn set_default_fields(&mut self, field_names: Vec<String>)
Set default fields by name
Sourcepub fn set_query_routers(&mut self, rules: Vec<QueryRouterRule>)
pub fn set_query_routers(&mut self, rules: Vec<QueryRouterRule>)
Set query router rules
pub fn build(self) -> Schema
Trait Implementations§
Source§impl Debug for SchemaBuilder
impl Debug for SchemaBuilder
Source§impl Default for SchemaBuilder
impl Default for SchemaBuilder
Source§fn default() -> SchemaBuilder
fn default() -> SchemaBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SchemaBuilder
impl RefUnwindSafe for SchemaBuilder
impl Send for SchemaBuilder
impl Sync for SchemaBuilder
impl Unpin for SchemaBuilder
impl UnwindSafe for SchemaBuilder
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> 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