pub struct TypedDecisionResponse { /* private fields */ }Expand description
Validated native response retaining its request’s typed schema/identities.
Implementations§
Source§impl TypedDecisionResponse
impl TypedDecisionResponse
Sourcepub fn raw(&self) -> &DecisionResponse
pub fn raw(&self) -> &DecisionResponse
Native response, borrowed immutably for extension fields.
Sourcepub fn answer<A: AnswerKind>(
&self,
question: &QuestionSpec<A>,
) -> Result<A::Output<'_>, Error>
pub fn answer<A: AnswerKind>( &self, question: &QuestionSpec<A>, ) -> Result<A::Output<'_>, Error>
Inferred checked answer. Result is an error for a question from a different request,
not an optional field; normal error propagation uses ?, never unwrap/expect.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TypedDecisionResponse
impl RefUnwindSafe for TypedDecisionResponse
impl Send for TypedDecisionResponse
impl Sync for TypedDecisionResponse
impl Unpin for TypedDecisionResponse
impl UnsafeUnpin for TypedDecisionResponse
impl UnwindSafe for TypedDecisionResponse
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