Skip to main content

IntoServiceOutcome

Trait IntoServiceOutcome 

Source
pub trait IntoServiceOutcome {
    // Required method
    fn into_service_outcome(self) -> ServiceOutcome;
}
Expand description

Converts function-backed service return values into ServiceOutcome.

Concrete SupervisedService implementations still return ServiceOutcome directly. This trait is intentionally used by service_fn so one-off async functions can use natural signatures like Result<(), Error> without widening the core service trait.

Required Methods§

Source

fn into_service_outcome(self) -> ServiceOutcome

Converts self into the terminal outcome observed by the supervisor.

Implementations on Foreign Types§

Source§

impl IntoServiceOutcome for Infallible

Source§

impl IntoServiceOutcome for ()

Source§

impl<T, E> IntoServiceOutcome for Result<T, E>

Implementors§