#[non_exhaustive]pub struct IndexStatus {
pub index_time: Option<Timestamp>,
pub error_samples: Vec<Status>,
pub pending_message: String,
/* private fields */
}Available on crate features
conversational-search-service or document-service or recommendation-service or search-service only.Expand description
Index status of the document.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.index_time: Option<Timestamp>The time when the document was indexed. If this field is populated, it means the document has been indexed.
error_samples: Vec<Status>A sample of errors encountered while indexing the document. If this field is populated, the document is not indexed due to errors.
pending_message: StringImmutable. The message indicates the document index is in progress. If this field is populated, the document index is pending.
Implementations§
Source§impl IndexStatus
impl IndexStatus
pub fn new() -> Self
Sourcepub fn set_index_time<T>(self, v: T) -> Self
pub fn set_index_time<T>(self, v: T) -> Self
Sets the value of index_time.
§Example
ⓘ
use wkt::Timestamp;
let x = IndexStatus::new().set_index_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_index_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_index_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of index_time.
§Example
ⓘ
use wkt::Timestamp;
let x = IndexStatus::new().set_or_clear_index_time(Some(Timestamp::default()/* use setters */));
let x = IndexStatus::new().set_or_clear_index_time(None::<Timestamp>);Sourcepub fn set_error_samples<T, V>(self, v: T) -> Self
pub fn set_error_samples<T, V>(self, v: T) -> Self
Sets the value of error_samples.
§Example
ⓘ
use rpc::model::Status;
let x = IndexStatus::new()
.set_error_samples([
Status::default()/* use setters */,
Status::default()/* use (different) setters */,
]);Sourcepub fn set_pending_message<T: Into<String>>(self, v: T) -> Self
pub fn set_pending_message<T: Into<String>>(self, v: T) -> Self
Sets the value of pending_message.
§Example
ⓘ
let x = IndexStatus::new().set_pending_message("example");Trait Implementations§
Source§impl Clone for IndexStatus
impl Clone for IndexStatus
Source§fn clone(&self) -> IndexStatus
fn clone(&self) -> IndexStatus
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 IndexStatus
impl Debug for IndexStatus
Source§impl Default for IndexStatus
impl Default for IndexStatus
Source§fn default() -> IndexStatus
fn default() -> IndexStatus
Returns the “default value” for a type. Read more
Source§impl Message for IndexStatus
impl Message for IndexStatus
Source§impl PartialEq for IndexStatus
impl PartialEq for IndexStatus
impl StructuralPartialEq for IndexStatus
Auto Trait Implementations§
impl Freeze for IndexStatus
impl RefUnwindSafe for IndexStatus
impl Send for IndexStatus
impl Sync for IndexStatus
impl Unpin for IndexStatus
impl UnwindSafe for IndexStatus
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