#[non_exhaustive]pub enum ResponseRecord {
Bool {
value: bool,
},
Text {
value: String,
},
SecretRedacted {
sha256_of_plaintext: String,
},
Acknowledged,
}Expand description
Serializable, redacted form of a user response.
Used inside StepFact::PromptAnswered so that the transcript records
what was answered without ever persisting plaintext secrets. The
in-flight Response type lives next to the channel protocol in
rite-runtime; conversion happens at the moment the prompt is accepted.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Bool
Yes / no answer.
Text
Free-form text answer.
SecretRedacted
Secret answer, replaced by a deterministic hash of the plaintext so verifiers can confirm a specific secret was provided without seeing it.
Acknowledged
Acknowledgement of a Prompt::Continue.
Trait Implementations§
Source§impl Clone for ResponseRecord
impl Clone for ResponseRecord
Source§fn clone(&self) -> ResponseRecord
fn clone(&self) -> ResponseRecord
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 ResponseRecord
impl Debug for ResponseRecord
Source§impl<'de> Deserialize<'de> for ResponseRecord
impl<'de> Deserialize<'de> for ResponseRecord
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
Auto Trait Implementations§
impl Freeze for ResponseRecord
impl RefUnwindSafe for ResponseRecord
impl Send for ResponseRecord
impl Sync for ResponseRecord
impl Unpin for ResponseRecord
impl UnsafeUnpin for ResponseRecord
impl UnwindSafe for ResponseRecord
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