pub struct InteractionResponse {
pub interaction_id: Uuid,
pub decision: Decision,
pub reasoning: Option<String>,
pub responded_at: DateTime<Utc>,
pub responder_id: Option<String>,
}Expand description
The human’s response to an InteractionRequest.
Fields§
§interaction_id: UuidCorrelation ID — must match the InteractionRequest.interaction_id.
decision: DecisionThe human’s decision.
reasoning: Option<String>Optional free-text reasoning or feedback.
responded_at: DateTime<Utc>When the response was created.
responder_id: Option<String>Who responded (channel identity, e.g., “cli:tty0”, “slack:U12345”).
Implementations§
Source§impl InteractionResponse
impl InteractionResponse
Sourcepub fn new(interaction_id: Uuid, decision: Decision) -> Self
pub fn new(interaction_id: Uuid, decision: Decision) -> Self
Create a new response for a given interaction.
Sourcepub fn with_reasoning(self, reasoning: impl Into<String>) -> Self
pub fn with_reasoning(self, reasoning: impl Into<String>) -> Self
Set reasoning text.
Sourcepub fn with_responder(self, responder_id: impl Into<String>) -> Self
pub fn with_responder(self, responder_id: impl Into<String>) -> Self
Set responder identity.
Trait Implementations§
Source§impl Clone for InteractionResponse
impl Clone for InteractionResponse
Source§fn clone(&self) -> InteractionResponse
fn clone(&self) -> InteractionResponse
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 InteractionResponse
impl Debug for InteractionResponse
Source§impl<'de> Deserialize<'de> for InteractionResponse
impl<'de> Deserialize<'de> for InteractionResponse
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for InteractionResponse
impl Display for InteractionResponse
Auto Trait Implementations§
impl Freeze for InteractionResponse
impl RefUnwindSafe for InteractionResponse
impl Send for InteractionResponse
impl Sync for InteractionResponse
impl Unpin for InteractionResponse
impl UnsafeUnpin for InteractionResponse
impl UnwindSafe for InteractionResponse
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.