pub struct ResponseContract { /* private fields */ }Expand description
Request-bound answer expectations retained while an engine consumes the request.
Implementations§
Source§impl ResponseContract
impl ResponseContract
Sourcepub fn from_request(req: &SystemRequest) -> ValidationResult<Self>
pub fn from_request(req: &SystemRequest) -> ValidationResult<Self>
Capture question IDs, types, Choice keys, and Score levels without copying state or instructions.
Sourcepub fn validate(&self, resp: &SystemResponse) -> ValidationResult<()>
pub fn validate(&self, resp: &SystemResponse) -> ValidationResult<()>
Check that every answer matches the originating question and wire rules.
Auto Trait Implementations§
impl Freeze for ResponseContract
impl RefUnwindSafe for ResponseContract
impl Send for ResponseContract
impl Sync for ResponseContract
impl Unpin for ResponseContract
impl UnsafeUnpin for ResponseContract
impl UnwindSafe for ResponseContract
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