TupleApply

Trait TupleApply 

Source
pub trait TupleApply<Args> {
    type Output;

    // Required method
    fn apply(self, args: Args) -> Self::Output;
}
Expand description

Trait for applying a function to arguments.

Allows launch(f, (a, b, c)) to call f(a, b, c) instead of f((a, b, c)). Single reference args can be passed directly without tuple wrapper.

Required Associated Types§

Source

type Output

Return type of the function.

Required Methods§

Source

fn apply(self, args: Args) -> Self::Output

Apply the function to the arguments.

Implementors§

Source§

impl<F, A, R> TupleApply<&A> for F
where F: FnOnce(&A) -> R,

Source§

impl<F, A, R> TupleApply<&mut A> for F
where F: FnOnce(&mut A) -> R,

Source§

impl<Func, A, B, C, D, E, G, H, I, J, K, L, M, N, O, P, Q, R, Ret> TupleApply<(A, B, C, D, E, G, H, I, J, K, L, M, N, O, P, Q, R)> for Func
where Func: FnOnce(A, B, C, D, E, G, H, I, J, K, L, M, N, O, P, Q, R) -> Ret,

Source§

type Output = Ret

Source§

impl<Func, A, B, C, D, E, G, H, I, J, K, L, M, N, O, P, Q, R, S, Ret> TupleApply<(A, B, C, D, E, G, H, I, J, K, L, M, N, O, P, Q, R, S)> for Func
where Func: FnOnce(A, B, C, D, E, G, H, I, J, K, L, M, N, O, P, Q, R, S) -> Ret,

Source§

type Output = Ret

Source§

impl<Func, A, B, C, D, E, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, Ret> TupleApply<(A, B, C, D, E, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)> for Func
where Func: FnOnce(A, B, C, D, E, G, H, I, J, K, L, M, N, O, P, Q, R, S, T) -> Ret,

Source§

type Output = Ret

Source§

impl<Func, A, B, C, D, E, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, Ret> TupleApply<(A, B, C, D, E, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U)> for Func
where Func: FnOnce(A, B, C, D, E, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U) -> Ret,

Source§

type Output = Ret

Source§

impl<Func, A, B, C, D, E, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, Ret> TupleApply<(A, B, C, D, E, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V)> for Func
where Func: FnOnce(A, B, C, D, E, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V) -> Ret,

Source§

type Output = Ret

Source§

impl<Func, A, B, C, D, E, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, Ret> TupleApply<(A, B, C, D, E, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W)> for Func
where Func: FnOnce(A, B, C, D, E, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W) -> Ret,

Source§

type Output = Ret

Source§

impl<Func, A, B, C, D, E, G, H, I, J, K, L, M, N, O, P, Q, Ret> TupleApply<(A, B, C, D, E, G, H, I, J, K, L, M, N, O, P, Q)> for Func
where Func: FnOnce(A, B, C, D, E, G, H, I, J, K, L, M, N, O, P, Q) -> Ret,

Source§

type Output = Ret

Source§

impl<Func, A, B, C, D, E, G, H, I, J, K, L, M, N, O, P, Ret> TupleApply<(A, B, C, D, E, G, H, I, J, K, L, M, N, O, P)> for Func
where Func: FnOnce(A, B, C, D, E, G, H, I, J, K, L, M, N, O, P) -> Ret,

Source§

type Output = Ret

Source§

impl<Func, A, B, C, D, E, G, H, I, J, K, L, M, N, O, Ret> TupleApply<(A, B, C, D, E, G, H, I, J, K, L, M, N, O)> for Func
where Func: FnOnce(A, B, C, D, E, G, H, I, J, K, L, M, N, O) -> Ret,

Source§

type Output = Ret

Source§

impl<Func, A, B, C, D, E, G, H, I, J, K, L, M, N, Ret> TupleApply<(A, B, C, D, E, G, H, I, J, K, L, M, N)> for Func
where Func: FnOnce(A, B, C, D, E, G, H, I, J, K, L, M, N) -> Ret,

Source§

type Output = Ret

Source§

impl<Func, A, B, C, D, E, G, H, I, J, K, L, M, Ret> TupleApply<(A, B, C, D, E, G, H, I, J, K, L, M)> for Func
where Func: FnOnce(A, B, C, D, E, G, H, I, J, K, L, M) -> Ret,

Source§

type Output = Ret

Source§

impl<Func, A, B, C, D, E, G, H, I, J, K, L, Ret> TupleApply<(A, B, C, D, E, G, H, I, J, K, L)> for Func
where Func: FnOnce(A, B, C, D, E, G, H, I, J, K, L) -> Ret,

Source§

type Output = Ret

Source§

impl<Func, A, B, C, D, E, G, H, I, J, K, Ret> TupleApply<(A, B, C, D, E, G, H, I, J, K)> for Func
where Func: FnOnce(A, B, C, D, E, G, H, I, J, K) -> Ret,

Source§

type Output = Ret

Source§

impl<Func, A, B, C, D, E, G, H, I, J, Ret> TupleApply<(A, B, C, D, E, G, H, I, J)> for Func
where Func: FnOnce(A, B, C, D, E, G, H, I, J) -> Ret,

Source§

type Output = Ret

Source§

impl<Func, A, B, C, D, E, G, H, I, Ret> TupleApply<(A, B, C, D, E, G, H, I)> for Func
where Func: FnOnce(A, B, C, D, E, G, H, I) -> Ret,

Source§

type Output = Ret

Source§

impl<Func, A, B, C, D, E, G, H, Ret> TupleApply<(A, B, C, D, E, G, H)> for Func
where Func: FnOnce(A, B, C, D, E, G, H) -> Ret,

Source§

type Output = Ret

Source§

impl<Func, A, B, C, D, E, G, Ret> TupleApply<(A, B, C, D, E, G)> for Func
where Func: FnOnce(A, B, C, D, E, G) -> Ret,

Source§

type Output = Ret

Source§

impl<Func, A, B, C, D, E, Ret> TupleApply<(A, B, C, D, E)> for Func
where Func: FnOnce(A, B, C, D, E) -> Ret,

Source§

type Output = Ret

Source§

impl<Func, A, B, C, D, Ret> TupleApply<(A, B, C, D)> for Func
where Func: FnOnce(A, B, C, D) -> Ret,

Source§

type Output = Ret

Source§

impl<Func, A, B, C, Ret> TupleApply<(A, B, C)> for Func
where Func: FnOnce(A, B, C) -> Ret,

Source§

type Output = Ret

Source§

impl<Func, A, B, Ret> TupleApply<(A, B)> for Func
where Func: FnOnce(A, B) -> Ret,

Source§

type Output = Ret