Struct SearchIndexDocument
pub struct SearchIndexDocument { /* private fields */ }Expand description
A modeled search-index document.
Implementations§
§impl SearchIndexDocument
impl SearchIndexDocument
pub fn new(id: SearchDocumentId) -> SearchIndexDocument
pub fn new(id: SearchDocumentId) -> SearchIndexDocument
Creates an empty search-index document.
pub fn with_field(
self,
field: SearchField,
value: impl Into<String>,
) -> SearchIndexDocument
pub fn with_field( self, field: SearchField, value: impl Into<String>, ) -> SearchIndexDocument
Adds a field value.
pub const fn id(&self) -> &SearchDocumentId
pub const fn id(&self) -> &SearchDocumentId
Returns the document identifier.
pub fn fields(&self) -> &[(SearchField, String)]
pub fn fields(&self) -> &[(SearchField, String)]
Returns field values.
Trait Implementations§
§impl Clone for SearchIndexDocument
impl Clone for SearchIndexDocument
§fn clone(&self) -> SearchIndexDocument
fn clone(&self) -> SearchIndexDocument
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for SearchIndexDocument
impl Debug for SearchIndexDocument
§impl PartialEq for SearchIndexDocument
impl PartialEq for SearchIndexDocument
impl Eq for SearchIndexDocument
impl StructuralPartialEq for SearchIndexDocument
Auto Trait Implementations§
impl Freeze for SearchIndexDocument
impl RefUnwindSafe for SearchIndexDocument
impl Send for SearchIndexDocument
impl Sync for SearchIndexDocument
impl Unpin for SearchIndexDocument
impl UnsafeUnpin for SearchIndexDocument
impl UnwindSafe for SearchIndexDocument
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