pub struct SearchIndexDocument { /* private fields */ }Expand description
A modeled search-index document.
Implementations§
Source§impl SearchIndexDocument
impl SearchIndexDocument
Sourcepub fn new(id: SearchDocumentId) -> Self
pub fn new(id: SearchDocumentId) -> Self
Creates an empty search-index document.
Sourcepub fn with_field(self, field: SearchField, value: impl Into<String>) -> Self
pub fn with_field(self, field: SearchField, value: impl Into<String>) -> Self
Adds a field value.
Sourcepub const fn id(&self) -> &SearchDocumentId
pub const fn id(&self) -> &SearchDocumentId
Returns the document identifier.
Sourcepub fn fields(&self) -> &[(SearchField, String)]
pub fn fields(&self) -> &[(SearchField, String)]
Returns field values.
Trait Implementations§
Source§impl Clone for SearchIndexDocument
impl Clone for SearchIndexDocument
Source§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 moreSource§impl Debug for SearchIndexDocument
impl Debug for SearchIndexDocument
Source§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