#[non_exhaustive]pub struct PredictionResult {
pub id: String,
pub metadata: HashMap<String, Value>,
/* private fields */
}Expand description
PredictionResult represents the recommendation prediction results.
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: StringID of the recommended product
metadata: HashMap<String, Value>Additional product metadata / annotations.
Possible values:
product: JSON representation of the product. Is set ifreturnProductis set to true inPredictRequest.params.score: Prediction score in double value. Is set ifreturnScoreis set to true inPredictRequest.params.
Implementations§
Trait Implementations§
Source§impl Clone for PredictionResult
impl Clone for PredictionResult
Source§fn clone(&self) -> PredictionResult
fn clone(&self) -> PredictionResult
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 PredictionResult
impl Debug for PredictionResult
Source§impl Default for PredictionResult
impl Default for PredictionResult
Source§fn default() -> PredictionResult
fn default() -> PredictionResult
Returns the “default value” for a type. Read more
Source§impl Message for PredictionResult
impl Message for PredictionResult
Source§impl PartialEq for PredictionResult
impl PartialEq for PredictionResult
impl StructuralPartialEq for PredictionResult
Auto Trait Implementations§
impl Freeze for PredictionResult
impl RefUnwindSafe for PredictionResult
impl Send for PredictionResult
impl Sync for PredictionResult
impl Unpin for PredictionResult
impl UnwindSafe for PredictionResult
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