#[non_exhaustive]pub struct RankingRecord {
pub id: String,
pub title: String,
pub content: String,
pub score: f32,
/* private fields */
}Available on crate feature
rank-service only.Expand description
Record message for RankService.Rank method.
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.id: StringThe unique ID to represent the record.
title: StringThe title of the record. Empty by default. At least one of title or content should be set otherwise an INVALID_ARGUMENT error is thrown.
content: StringThe content of the record. Empty by default. At least one of title or content should be set otherwise an INVALID_ARGUMENT error is thrown.
score: f32The score of this record based on the given query and selected model. The score will be rounded to 2 decimal places. If the score is close to 0, it will be rounded to 0.0001 to avoid returning unset.
Implementations§
Trait Implementations§
Source§impl Clone for RankingRecord
impl Clone for RankingRecord
Source§fn clone(&self) -> RankingRecord
fn clone(&self) -> RankingRecord
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 RankingRecord
impl Debug for RankingRecord
Source§impl Default for RankingRecord
impl Default for RankingRecord
Source§fn default() -> RankingRecord
fn default() -> RankingRecord
Returns the “default value” for a type. Read more
Source§impl Message for RankingRecord
impl Message for RankingRecord
Source§impl PartialEq for RankingRecord
impl PartialEq for RankingRecord
impl StructuralPartialEq for RankingRecord
Auto Trait Implementations§
impl Freeze for RankingRecord
impl RefUnwindSafe for RankingRecord
impl Send for RankingRecord
impl Sync for RankingRecord
impl Unpin for RankingRecord
impl UnwindSafe for RankingRecord
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