Enum carapax::PredicateOutput
source · pub enum PredicateOutput {
True(HandlerResult),
False,
Err(HandlerError),
}
Expand description
Output of the predicate decorator
Variants§
True(HandlerResult)
A decorated handler has been executed.
False
A decorated handler has not been executed.
Err(HandlerError)
An error occurred during a predicate execution.
Trait Implementations§
source§impl From<PredicateOutput> for ChainResult
impl From<PredicateOutput> for ChainResult
source§fn from(output: PredicateOutput) -> Self
fn from(output: PredicateOutput) -> Self
Converts to this type from the input type.
source§impl From<PredicateResult> for PredicateOutput
impl From<PredicateResult> for PredicateOutput
source§fn from(result: PredicateResult) -> Self
fn from(result: PredicateResult) -> Self
Converts to this type from the input type.
source§impl From<Result<(), HandlerError>> for PredicateOutput
impl From<Result<(), HandlerError>> for PredicateOutput
source§fn from(result: HandlerResult) -> Self
fn from(result: HandlerResult) -> Self
Converts to this type from the input type.
source§impl IntoHandlerResult for PredicateOutput
impl IntoHandlerResult for PredicateOutput
source§fn into_result(self) -> HandlerResult
fn into_result(self) -> HandlerResult
Returns the converted object.
Auto Trait Implementations§
impl Freeze for PredicateOutput
impl !RefUnwindSafe for PredicateOutput
impl Send for PredicateOutput
impl !Sync for PredicateOutput
impl Unpin for PredicateOutput
impl !UnwindSafe for PredicateOutput
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> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§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