pub struct ChoiceSelectionFeedback {
pub request_id: String,
pub chosen_index: u32,
pub rejected_indices: Option<Vec<u32>>,
pub latency_to_select_ms: Option<u64>,
pub ui_context: Option<Value>,
pub candidate_hashes: Option<Vec<String>>,
pub timestamp: f64,
}Expand description
Feedback for multi-candidate selection.
Fields§
§request_id: String§chosen_index: u32§rejected_indices: Option<Vec<u32>>§latency_to_select_ms: Option<u64>§ui_context: Option<Value>§candidate_hashes: Option<Vec<String>>§timestamp: f64Implementations§
Source§impl ChoiceSelectionFeedback
impl ChoiceSelectionFeedback
pub fn new( request_id: impl Into<String>, chosen_index: u32, ) -> ChoiceSelectionFeedback
pub fn with_rejected(self, indices: Vec<u32>) -> ChoiceSelectionFeedback
pub fn with_latency(self, ms: u64) -> ChoiceSelectionFeedback
Trait Implementations§
Source§impl Clone for ChoiceSelectionFeedback
impl Clone for ChoiceSelectionFeedback
Source§fn clone(&self) -> ChoiceSelectionFeedback
fn clone(&self) -> ChoiceSelectionFeedback
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 ChoiceSelectionFeedback
impl Debug for ChoiceSelectionFeedback
Source§impl<'de> Deserialize<'de> for ChoiceSelectionFeedback
impl<'de> Deserialize<'de> for ChoiceSelectionFeedback
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ChoiceSelectionFeedback, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ChoiceSelectionFeedback, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for ChoiceSelectionFeedback
impl Serialize for ChoiceSelectionFeedback
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for ChoiceSelectionFeedback
impl RefUnwindSafe for ChoiceSelectionFeedback
impl Send for ChoiceSelectionFeedback
impl Sync for ChoiceSelectionFeedback
impl Unpin for ChoiceSelectionFeedback
impl UnsafeUnpin for ChoiceSelectionFeedback
impl UnwindSafe for ChoiceSelectionFeedback
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