pub struct Observation {
pub feedback: Feedback,
pub session: usize,
pub feature_names: Vec<String>,
pub schema_version: u32,
pub provenance: Provenance,
}Expand description
One feedback event: what happened, in which session, over which features.
Fields§
§feedback: FeedbackWhat the user did.
session: usizeSession index (sessions own their own τ).
feature_names: Vec<String>Names of the φ coordinates, in vector order. Empty means “unknown” — the vectors can only be interpreted positionally.
schema_version: u32Which φ schema the vectors are in (PHI_SCHEMA for raw values).
provenance: ProvenanceHow this preference was collected. Omitted from the wire form when it
is Provenance::Duel, which is what every log written before this
field existed contains.
Implementations§
Source§impl Observation
impl Observation
Sourcepub fn new(feedback: Feedback, session: usize, feature_names: &[String]) -> Self
pub fn new(feedback: Feedback, session: usize, feature_names: &[String]) -> Self
A fresh observation in the current schema, from a heard duel.
Trait Implementations§
Source§impl Clone for Observation
impl Clone for Observation
Source§fn clone(&self) -> Observation
fn clone(&self) -> Observation
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 Observation
impl Debug for Observation
Source§impl<'de> Deserialize<'de> for Observation
impl<'de> Deserialize<'de> for Observation
Source§fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for Observation
impl PartialEq for Observation
Source§fn eq(&self, other: &Observation) -> bool
fn eq(&self, other: &Observation) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for Observation
impl Serialize for Observation
impl StructuralPartialEq for Observation
Auto Trait Implementations§
impl Freeze for Observation
impl RefUnwindSafe for Observation
impl Send for Observation
impl Sync for Observation
impl Unpin for Observation
impl UnsafeUnpin for Observation
impl UnwindSafe for Observation
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