IntoRoutine

Trait IntoRoutine 

Source
pub trait IntoRoutine<Ctx, Input, Output, Marker>: Sized {
    type Routine: Routine<Ctx, In = Input, Out = Output>;

    // Required method
    fn into_routine(this: Self) -> Self::Routine;

    // Provided method
    fn with_name(self, name: impl Into<String>) -> IntoNamedRoutine<Ctx, Self> { ... }
}

Required Associated Types§

Source

type Routine: Routine<Ctx, In = Input, Out = Output>

Required Methods§

Source

fn into_routine(this: Self) -> Self::Routine

Provided Methods§

Source

fn with_name(self, name: impl Into<String>) -> IntoNamedRoutine<Ctx, Self>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<Ctx, I, O, M, S, N> IntoRoutine<Ctx, I, O, (IsNamedRoutine, N, M)> for (N, S)
where S: IntoRoutine<Ctx, I, O, M>, N: Into<String>,

Source§

type Routine = NamedRoutine<<S as IntoRoutine<Ctx, I, O, M>>::Routine>

Source§

fn into_routine(this: Self) -> Self::Routine

Implementors§

Source§

impl<Ctx, Marker, F> IntoRoutine<Ctx, <F as RoutineParamFunction<Ctx, Marker>>::In, <F as RoutineParamFunction<Ctx, Marker>>::Out, (IsFunctionRoutine, Marker)> for F
where Marker: 'static, F: RoutineParamFunction<Ctx, Marker>,

Source§

type Routine = FunctionRoutine<Marker, F>

Source§

impl<Ctx, T: Routine<Ctx>> IntoRoutine<Ctx, <T as Routine<Ctx>>::In, <T as Routine<Ctx>>::Out, ()> for T