pub struct SearchDocumentBuilder { /* private fields */ }Expand description
Search document builder
Implementations§
Source§impl SearchDocumentBuilder
impl SearchDocumentBuilder
Sourcepub fn field<T: Serialize>(
self,
name: impl Into<String>,
value: T,
) -> Result<Self, Error>
pub fn field<T: Serialize>( self, name: impl Into<String>, value: T, ) -> Result<Self, Error>
Add field
Sourcepub fn json_field(self, name: impl Into<String>, value: Value) -> Self
pub fn json_field(self, name: impl Into<String>, value: Value) -> Self
Add JSON field
Sourcepub fn metadata(self, metadata: DocumentMetadata) -> Self
pub fn metadata(self, metadata: DocumentMetadata) -> Self
Set metadata
Add multiple tags
Sourcepub fn build(self) -> SearchDocument
pub fn build(self) -> SearchDocument
Build the search document
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SearchDocumentBuilder
impl RefUnwindSafe for SearchDocumentBuilder
impl Send for SearchDocumentBuilder
impl Sync for SearchDocumentBuilder
impl Unpin for SearchDocumentBuilder
impl UnsafeUnpin for SearchDocumentBuilder
impl UnwindSafe for SearchDocumentBuilder
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