pub enum ShellTaskBehavior<T> {
EarlyReturn(Result<T, Box<dyn Error + Send + Sync + 'static>>),
Passthrough,
}
Expand description
ShellTaskBehavior
allows you to terminate a process
early, or to continue inside your log handler.
Variantsยง
EarlyReturn(Result<T, Box<dyn Error + Send + Sync + 'static>>)
When a log handler returns this variant after processing a log line,
the underlying process is terminated and the underlying Result
is returned.
Passthrough
When a log handler returns this variant after processing a log line, the process is allowed to continue.
Trait Implementationsยง
Auto Trait Implementationsยง
impl<T> Freeze for ShellTaskBehavior<T>where
T: Freeze,
impl<T> !RefUnwindSafe for ShellTaskBehavior<T>
impl<T> Send for ShellTaskBehavior<T>where
T: Send,
impl<T> Sync for ShellTaskBehavior<T>where
T: Sync,
impl<T> Unpin for ShellTaskBehavior<T>where
T: Unpin,
impl<T> !UnwindSafe for ShellTaskBehavior<T>
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> 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