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.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl IntoServiceOutcome for ()

Source§

impl IntoServiceOutcome for Infallible

Source§

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

Implementors§