Enum AnswerCheck
#[non_exhaustive]pub enum AnswerCheck {
Accept,
Read(String),
Refuse(Refusal),
End(Refusal),
}Expand description
What a tool says about an answer to its own question: see Tool::read_answer.
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.
Accept
Hand the answer to the model as the result of the call.
Read(String)
Hand the model these words as the result of the call, in place of the answer’s own: what the tool read the answer as.
Refuse(Refusal)
The answer is not used: ask again.
End(Refusal)
The answer is not used and the question is not asked again: the call ends with
Refusal::question as its error result, which the model reads, and the run carries on.
Refusal::ui is not used. The refusal is journaled like any other.
Implementations§
§impl AnswerCheck
impl AnswerCheck
pub fn scrubbed(
self,
text: impl FnMut(String) -> String,
ui: impl FnMut(&mut Value),
) -> AnswerCheck
pub fn scrubbed( self, text: impl FnMut(String) -> String, ui: impl FnMut(&mut Value), ) -> AnswerCheck
The same check with every text the person or the model will read passed through text, and
every interface through ui: for a wrapper that hides secrets (a Refusal is made from the
call’s own arguments, which a scrub has not seen).
Trait Implementations§
§impl Clone for AnswerCheck
impl Clone for AnswerCheck
§fn clone(&self) -> AnswerCheck
fn clone(&self) -> AnswerCheck
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 more§impl Debug for AnswerCheck
impl Debug for AnswerCheck
§impl PartialEq for AnswerCheck
impl PartialEq for AnswerCheck
impl StructuralPartialEq for AnswerCheck
Auto Trait Implementations§
impl Freeze for AnswerCheck
impl RefUnwindSafe for AnswerCheck
impl Send for AnswerCheck
impl Sync for AnswerCheck
impl Unpin for AnswerCheck
impl UnsafeUnpin for AnswerCheck
impl UnwindSafe for AnswerCheck
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
Converts
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>
Converts
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§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered].§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> ServiceExt for T
impl<T> ServiceExt for T
§fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
Apply a transformation to the response body. Read more
§fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
High level tracing that classifies responses using HTTP status codes. Read more
§fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
High level tracing that classifies responses using gRPC headers. Read more