pub enum ErrorPolicy<E> {
Retry,
Skip,
Exit,
Call(fn(E)),
}Expand description
Specify what the indexer event handler should do for specific errors. See: ErrorPolicyProvider.
The idea is that an error type, E, implements ErrorPolicyProvider.
Based on the different variants of E, different ErrorPolicy can be returned, which influences
the behavior of the event handler.
Variants§
Retry
Indicate the callback operation should be retried. Also see: RetryPolicy.
Skip
Indicate that the error should be ignored, go to next event.
Exit
Indicate that the event handler should exit with error.
Call(fn(E))
Indicate that the event handler should call given error handling function with the error.
Auto Trait Implementations§
impl<E> Freeze for ErrorPolicy<E>
impl<E> RefUnwindSafe for ErrorPolicy<E>
impl<E> Send for ErrorPolicy<E>
impl<E> Sync for ErrorPolicy<E>
impl<E> Unpin for ErrorPolicy<E>
impl<E> UnwindSafe for ErrorPolicy<E>
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
§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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request