pub struct VerifiedQuestionAnswer {Show 13 fields
pub turn_id: String,
pub call_id: String,
pub index: u32,
pub question_args_json: String,
pub state: String,
pub selected_index: Option<u32>,
pub selected_label: String,
pub answered_by: String,
pub conversation_id: String,
pub nonce: String,
pub signer_public_key: Vec<u8>,
pub signer_pk_hex: String,
pub signature_hex: String,
}Expand description
A verified, decoded question_response payload.
Fields§
§turn_id: StringTurn that emitted this occurrence. Empty only on durable answers written before occurrence identity was introduced.
call_id: StringThe ask_question tool-call id this answer resolves.
index: u32This answer’s question index within its call’s questions array.
question_args_json: StringThe bound raw ask_question call arguments (every question in the
call) — the audit binding Self::binds_question matches
byte-for-byte.
state: StringOne of ANSWERED_STATE, DECLINED_STATE, or
AUTO_RESOLVED_STATE.
selected_index: Option<u32>The chosen option’s index, when state == ANSWERED_STATE or
AUTO_RESOLVED_STATE. None for a decline.
selected_label: StringThe chosen option’s label, mirrored alongside the index so a consumer never has to re-resolve it against the (possibly since-compacted) original question payload.
answered_by: StringWho answered — empty for AUTO_RESOLVED_STATE (nobody did).
conversation_id: StringThe conversation this answer was signed for, covered by the signature so a token signed for one conversation cannot be replayed into another.
nonce: StringPer-answer unique value, covered by the signature. A consumer
records it on use so the answer cannot be re-applied once spent
(single-use, mirrors #370).
signer_public_key: Vec<u8>The verified signer’s public key (encoded).
signer_pk_hex: StringHex-encoded ed25519 public key of the signer — the same bytes as
Self::signer_public_key, kept alongside it in the wire-ready
encoding so a consumer forwarding this answer onward (the control
plane’s outstanding-answer collector, to the harness) never
re-derives the hex itself. Mirrors
polyc_crypto::approval::DecodedResponse::signer_pk_hex.
signature_hex: StringHex-encoded ed25519 signature over the canonical answer tuple —
forwarded onward so the harness can independently re-verify (THIN
signing) rather than trust the control plane’s own verification.
Mirrors polyc_crypto::approval::DecodedResponse::signature_hex.
Implementations§
Source§impl VerifiedQuestionAnswer
impl VerifiedQuestionAnswer
Sourcepub fn binds_question(
&self,
call_id: &str,
index: u32,
question_args_json: &str,
) -> bool
pub fn binds_question( &self, call_id: &str, index: u32, question_args_json: &str, ) -> bool
Whether this verified answer is bound to the EXACT question
(call_id, index, question_args_json) — the args-binding a resume
path must check before applying the answer, mirroring
crate::approval::VerifiedResponse::authorizes_call.
Trait Implementations§
Source§impl Clone for VerifiedQuestionAnswer
impl Clone for VerifiedQuestionAnswer
Source§fn clone(&self) -> VerifiedQuestionAnswer
fn clone(&self) -> VerifiedQuestionAnswer
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for VerifiedQuestionAnswer
impl Debug for VerifiedQuestionAnswer
impl Eq for VerifiedQuestionAnswer
Source§impl PartialEq for VerifiedQuestionAnswer
impl PartialEq for VerifiedQuestionAnswer
impl StructuralPartialEq for VerifiedQuestionAnswer
Auto Trait Implementations§
impl Freeze for VerifiedQuestionAnswer
impl RefUnwindSafe for VerifiedQuestionAnswer
impl Send for VerifiedQuestionAnswer
impl Sync for VerifiedQuestionAnswer
impl Unpin for VerifiedQuestionAnswer
impl UnsafeUnpin for VerifiedQuestionAnswer
impl UnwindSafe for VerifiedQuestionAnswer
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more