Enum ClassifiedResponse

pub enum ClassifiedResponse<FailureClass, ClassifyEos>

Result of doing a classification.

Variants

Ready(Result<(), FailureClass>)

The response was able to be classified immediately.

RequiresEos(ClassifyEos)

We have to wait until the end of a streaming response to classify it.

Trait Implementations

impl<FailureClass: Debug, ClassifyEos: Debug> Debug for ClassifiedResponse<FailureClass, ClassifyEos>

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Auto Trait Implementations

impl<FailureClass, ClassifyEos> Freeze for ClassifiedResponse<FailureClass, ClassifyEos> where Result<(), FailureClass>: Freeze, ClassifyEos: Freeze,

impl<FailureClass, ClassifyEos> RefUnwindSafe for ClassifiedResponse<FailureClass, ClassifyEos> where Result<(), FailureClass>: RefUnwindSafe, ClassifyEos: RefUnwindSafe,

impl<FailureClass, ClassifyEos> Send for ClassifiedResponse<FailureClass, ClassifyEos> where Result<(), FailureClass>: Send, ClassifyEos: Send,

impl<FailureClass, ClassifyEos> Sync for ClassifiedResponse<FailureClass, ClassifyEos> where Result<(), FailureClass>: Sync, ClassifyEos: Sync,

impl<FailureClass, ClassifyEos> Unpin for ClassifiedResponse<FailureClass, ClassifyEos> where Result<(), FailureClass>: Unpin, ClassifyEos: Unpin,

impl<FailureClass, ClassifyEos> UnsafeUnpin for ClassifiedResponse<FailureClass, ClassifyEos> where Result<(), FailureClass>: UnsafeUnpin, ClassifyEos: UnsafeUnpin,

impl<FailureClass, ClassifyEos> UnwindSafe for ClassifiedResponse<FailureClass, ClassifyEos> where Result<(), FailureClass>: UnwindSafe, ClassifyEos: UnwindSafe,

Blanket Implementations

impl<T> Any for ClassifiedResponse<FailureClass, ClassifyEos> where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for ClassifiedResponse<FailureClass, ClassifyEos> where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for ClassifiedResponse<FailureClass, ClassifyEos> where T: ?Sized,

fn borrow_mut(&mut self) -> &mut T

impl<T> From<T> for ClassifiedResponse<FailureClass, ClassifyEos>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> Instrument for ClassifiedResponse<FailureClass, ClassifyEos>

impl<T> PolicyExt for ClassifiedResponse<FailureClass, ClassifyEos> where T: ?Sized,

fn and<P, B, E>(self, other: P) -> And<T, P>
where
    T: Sized + Policy<B, E>,
    P: Policy<B, E>,
fn or<P, B, E>(self, other: P) -> Or<T, P>
where
    T: Sized + Policy<B, E>,
    P: Policy<B, E>,

impl<T> WithSubscriber for ClassifiedResponse<FailureClass, ClassifyEos>

impl<T, U> Into<U> for ClassifiedResponse<FailureClass, ClassifyEos> where U: From<T>,

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom<U> for ClassifiedResponse<FailureClass, ClassifyEos> where U: Into<T>,

type Error = Infallible;
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto<U> for ClassifiedResponse<FailureClass, ClassifyEos> where U: TryFrom<T>,

type Error = <U as TryFrom<T>>::Error;
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>