Trait reactivate::Merge

source ·
pub trait Merge {
    type Output;

    // Required method
    fn merge(self) -> Reactive<Self::Output>;
}
Expand description

This trait is used for implementing variadic generics.

The main goal is to convert a tuple (can be implemented for other types too) of reactives of arbitrary size (&Reactive<usize>, &Reactive<String>, &Reactive<f64>, ...)

to a tuple of their inner values (usize, String, f64, ...)

Default implementations for tuples is already provided (see impl_merge_for_nested_tuple macro)

use reactivate::{Reactive, Merge};

let r1: Reactive<usize> = Reactive::default();
let r2: Reactive<String> = Reactive::default();
let r3: Reactive<f64> = Reactive::default();

let r: Reactive<(usize, String, f64)> = (&r1, &r2, &r3).merge();

Required Associated Types§

Required Methods§

source

fn merge(self) -> Reactive<Self::Output>

Implementations on Foreign Types§

source§

impl<T0> Merge for (T0,)
where T0: Merge, T0::Output: Clone + Default + Send + 'static,

§

type Output = (<T0 as Merge>::Output,)

source§

fn merge(self) -> Reactive<Self::Output>

source§

impl<T0, T1> Merge for (T0, T1)
where T0: Merge, T1: Merge, T0::Output: Clone + Default + Send + 'static, T1::Output: Clone + Default + Send + 'static,

§

type Output = (<T0 as Merge>::Output, <T1 as Merge>::Output)

source§

fn merge(self) -> Reactive<Self::Output>

source§

impl<T0, T1, T2> Merge for (T0, T1, T2)
where T0: Merge, T1: Merge, T2: Merge, T0::Output: Clone + Default + Send + 'static, T1::Output: Clone + Default + Send + 'static, T2::Output: Clone + Default + Send + 'static,

§

type Output = (<T0 as Merge>::Output, <T1 as Merge>::Output, <T2 as Merge>::Output)

source§

fn merge(self) -> Reactive<Self::Output>

source§

impl<T0, T1, T2, T3> Merge for (T0, T1, T2, T3)
where T0: Merge, T1: Merge, T2: Merge, T3: Merge, T0::Output: Clone + Default + Send + 'static, T1::Output: Clone + Default + Send + 'static, T2::Output: Clone + Default + Send + 'static, T3::Output: Clone + Default + Send + 'static,

§

type Output = (<T0 as Merge>::Output, <T1 as Merge>::Output, <T2 as Merge>::Output, <T3 as Merge>::Output)

source§

fn merge(self) -> Reactive<Self::Output>

source§

impl<T0, T1, T2, T3, T4> Merge for (T0, T1, T2, T3, T4)
where T0: Merge, T1: Merge, T2: Merge, T3: Merge, T4: Merge, T0::Output: Clone + Default + Send + 'static, T1::Output: Clone + Default + Send + 'static, T2::Output: Clone + Default + Send + 'static, T3::Output: Clone + Default + Send + 'static, T4::Output: Clone + Default + Send + 'static,

§

type Output = (<T0 as Merge>::Output, <T1 as Merge>::Output, <T2 as Merge>::Output, <T3 as Merge>::Output, <T4 as Merge>::Output)

source§

fn merge(self) -> Reactive<Self::Output>

source§

impl<T0, T1, T2, T3, T4, T5> Merge for (T0, T1, T2, T3, T4, T5)
where T0: Merge, T1: Merge, T2: Merge, T3: Merge, T4: Merge, T5: Merge, T0::Output: Clone + Default + Send + 'static, T1::Output: Clone + Default + Send + 'static, T2::Output: Clone + Default + Send + 'static, T3::Output: Clone + Default + Send + 'static, T4::Output: Clone + Default + Send + 'static, T5::Output: Clone + Default + Send + 'static,

§

type Output = (<T0 as Merge>::Output, <T1 as Merge>::Output, <T2 as Merge>::Output, <T3 as Merge>::Output, <T4 as Merge>::Output, <T5 as Merge>::Output)

source§

fn merge(self) -> Reactive<Self::Output>

source§

impl<T0, T1, T2, T3, T4, T5, T6> Merge for (T0, T1, T2, T3, T4, T5, T6)
where T0: Merge, T1: Merge, T2: Merge, T3: Merge, T4: Merge, T5: Merge, T6: Merge, T0::Output: Clone + Default + Send + 'static, T1::Output: Clone + Default + Send + 'static, T2::Output: Clone + Default + Send + 'static, T3::Output: Clone + Default + Send + 'static, T4::Output: Clone + Default + Send + 'static, T5::Output: Clone + Default + Send + 'static, T6::Output: Clone + Default + Send + 'static,

§

type Output = (<T0 as Merge>::Output, <T1 as Merge>::Output, <T2 as Merge>::Output, <T3 as Merge>::Output, <T4 as Merge>::Output, <T5 as Merge>::Output, <T6 as Merge>::Output)

source§

fn merge(self) -> Reactive<Self::Output>

source§

impl<T0, T1, T2, T3, T4, T5, T6, T7> Merge for (T0, T1, T2, T3, T4, T5, T6, T7)
where T0: Merge, T1: Merge, T2: Merge, T3: Merge, T4: Merge, T5: Merge, T6: Merge, T7: Merge, T0::Output: Clone + Default + Send + 'static, T1::Output: Clone + Default + Send + 'static, T2::Output: Clone + Default + Send + 'static, T3::Output: Clone + Default + Send + 'static, T4::Output: Clone + Default + Send + 'static, T5::Output: Clone + Default + Send + 'static, T6::Output: Clone + Default + Send + 'static, T7::Output: Clone + Default + Send + 'static,

§

type Output = (<T0 as Merge>::Output, <T1 as Merge>::Output, <T2 as Merge>::Output, <T3 as Merge>::Output, <T4 as Merge>::Output, <T5 as Merge>::Output, <T6 as Merge>::Output, <T7 as Merge>::Output)

source§

fn merge(self) -> Reactive<Self::Output>

source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8> Merge for (T0, T1, T2, T3, T4, T5, T6, T7, T8)
where T0: Merge, T1: Merge, T2: Merge, T3: Merge, T4: Merge, T5: Merge, T6: Merge, T7: Merge, T8: Merge, T0::Output: Clone + Default + Send + 'static, T1::Output: Clone + Default + Send + 'static, T2::Output: Clone + Default + Send + 'static, T3::Output: Clone + Default + Send + 'static, T4::Output: Clone + Default + Send + 'static, T5::Output: Clone + Default + Send + 'static, T6::Output: Clone + Default + Send + 'static, T7::Output: Clone + Default + Send + 'static, T8::Output: Clone + Default + Send + 'static,

§

type Output = (<T0 as Merge>::Output, <T1 as Merge>::Output, <T2 as Merge>::Output, <T3 as Merge>::Output, <T4 as Merge>::Output, <T5 as Merge>::Output, <T6 as Merge>::Output, <T7 as Merge>::Output, <T8 as Merge>::Output)

source§

fn merge(self) -> Reactive<Self::Output>

source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> Merge for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)
where T0: Merge, T1: Merge, T2: Merge, T3: Merge, T4: Merge, T5: Merge, T6: Merge, T7: Merge, T8: Merge, T9: Merge, T0::Output: Clone + Default + Send + 'static, T1::Output: Clone + Default + Send + 'static, T2::Output: Clone + Default + Send + 'static, T3::Output: Clone + Default + Send + 'static, T4::Output: Clone + Default + Send + 'static, T5::Output: Clone + Default + Send + 'static, T6::Output: Clone + Default + Send + 'static, T7::Output: Clone + Default + Send + 'static, T8::Output: Clone + Default + Send + 'static, T9::Output: Clone + Default + Send + 'static,

§

type Output = (<T0 as Merge>::Output, <T1 as Merge>::Output, <T2 as Merge>::Output, <T3 as Merge>::Output, <T4 as Merge>::Output, <T5 as Merge>::Output, <T6 as Merge>::Output, <T7 as Merge>::Output, <T8 as Merge>::Output, <T9 as Merge>::Output)

source§

fn merge(self) -> Reactive<Self::Output>

source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> Merge for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)
where T0: Merge, T1: Merge, T2: Merge, T3: Merge, T4: Merge, T5: Merge, T6: Merge, T7: Merge, T8: Merge, T9: Merge, T10: Merge, T0::Output: Clone + Default + Send + 'static, T1::Output: Clone + Default + Send + 'static, T2::Output: Clone + Default + Send + 'static, T3::Output: Clone + Default + Send + 'static, T4::Output: Clone + Default + Send + 'static, T5::Output: Clone + Default + Send + 'static, T6::Output: Clone + Default + Send + 'static, T7::Output: Clone + Default + Send + 'static, T8::Output: Clone + Default + Send + 'static, T9::Output: Clone + Default + Send + 'static, T10::Output: Clone + Default + Send + 'static,

§

type Output = (<T0 as Merge>::Output, <T1 as Merge>::Output, <T2 as Merge>::Output, <T3 as Merge>::Output, <T4 as Merge>::Output, <T5 as Merge>::Output, <T6 as Merge>::Output, <T7 as Merge>::Output, <T8 as Merge>::Output, <T9 as Merge>::Output, <T10 as Merge>::Output)

source§

fn merge(self) -> Reactive<Self::Output>

source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> Merge for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)
where T0: Merge, T1: Merge, T2: Merge, T3: Merge, T4: Merge, T5: Merge, T6: Merge, T7: Merge, T8: Merge, T9: Merge, T10: Merge, T11: Merge, T0::Output: Clone + Default + Send + 'static, T1::Output: Clone + Default + Send + 'static, T2::Output: Clone + Default + Send + 'static, T3::Output: Clone + Default + Send + 'static, T4::Output: Clone + Default + Send + 'static, T5::Output: Clone + Default + Send + 'static, T6::Output: Clone + Default + Send + 'static, T7::Output: Clone + Default + Send + 'static, T8::Output: Clone + Default + Send + 'static, T9::Output: Clone + Default + Send + 'static, T10::Output: Clone + Default + Send + 'static, T11::Output: Clone + Default + Send + 'static,

§

type Output = (<T0 as Merge>::Output, <T1 as Merge>::Output, <T2 as Merge>::Output, <T3 as Merge>::Output, <T4 as Merge>::Output, <T5 as Merge>::Output, <T6 as Merge>::Output, <T7 as Merge>::Output, <T8 as Merge>::Output, <T9 as Merge>::Output, <T10 as Merge>::Output, <T11 as Merge>::Output)

source§

fn merge(self) -> Reactive<Self::Output>

source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> Merge for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)
where T0: Merge, T1: Merge, T2: Merge, T3: Merge, T4: Merge, T5: Merge, T6: Merge, T7: Merge, T8: Merge, T9: Merge, T10: Merge, T11: Merge, T12: Merge, T0::Output: Clone + Default + Send + 'static, T1::Output: Clone + Default + Send + 'static, T2::Output: Clone + Default + Send + 'static, T3::Output: Clone + Default + Send + 'static, T4::Output: Clone + Default + Send + 'static, T5::Output: Clone + Default + Send + 'static, T6::Output: Clone + Default + Send + 'static, T7::Output: Clone + Default + Send + 'static, T8::Output: Clone + Default + Send + 'static, T9::Output: Clone + Default + Send + 'static, T10::Output: Clone + Default + Send + 'static, T11::Output: Clone + Default + Send + 'static, T12::Output: Clone + Default + Send + 'static,

§

type Output = (<T0 as Merge>::Output, <T1 as Merge>::Output, <T2 as Merge>::Output, <T3 as Merge>::Output, <T4 as Merge>::Output, <T5 as Merge>::Output, <T6 as Merge>::Output, <T7 as Merge>::Output, <T8 as Merge>::Output, <T9 as Merge>::Output, <T10 as Merge>::Output, <T11 as Merge>::Output, <T12 as Merge>::Output)

source§

fn merge(self) -> Reactive<Self::Output>

source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> Merge for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13)
where T0: Merge, T1: Merge, T2: Merge, T3: Merge, T4: Merge, T5: Merge, T6: Merge, T7: Merge, T8: Merge, T9: Merge, T10: Merge, T11: Merge, T12: Merge, T13: Merge, T0::Output: Clone + Default + Send + 'static, T1::Output: Clone + Default + Send + 'static, T2::Output: Clone + Default + Send + 'static, T3::Output: Clone + Default + Send + 'static, T4::Output: Clone + Default + Send + 'static, T5::Output: Clone + Default + Send + 'static, T6::Output: Clone + Default + Send + 'static, T7::Output: Clone + Default + Send + 'static, T8::Output: Clone + Default + Send + 'static, T9::Output: Clone + Default + Send + 'static, T10::Output: Clone + Default + Send + 'static, T11::Output: Clone + Default + Send + 'static, T12::Output: Clone + Default + Send + 'static, T13::Output: Clone + Default + Send + 'static,

§

type Output = (<T0 as Merge>::Output, <T1 as Merge>::Output, <T2 as Merge>::Output, <T3 as Merge>::Output, <T4 as Merge>::Output, <T5 as Merge>::Output, <T6 as Merge>::Output, <T7 as Merge>::Output, <T8 as Merge>::Output, <T9 as Merge>::Output, <T10 as Merge>::Output, <T11 as Merge>::Output, <T12 as Merge>::Output, <T13 as Merge>::Output)

source§

fn merge(self) -> Reactive<Self::Output>

source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> Merge for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14)
where T0: Merge, T1: Merge, T2: Merge, T3: Merge, T4: Merge, T5: Merge, T6: Merge, T7: Merge, T8: Merge, T9: Merge, T10: Merge, T11: Merge, T12: Merge, T13: Merge, T14: Merge, T0::Output: Clone + Default + Send + 'static, T1::Output: Clone + Default + Send + 'static, T2::Output: Clone + Default + Send + 'static, T3::Output: Clone + Default + Send + 'static, T4::Output: Clone + Default + Send + 'static, T5::Output: Clone + Default + Send + 'static, T6::Output: Clone + Default + Send + 'static, T7::Output: Clone + Default + Send + 'static, T8::Output: Clone + Default + Send + 'static, T9::Output: Clone + Default + Send + 'static, T10::Output: Clone + Default + Send + 'static, T11::Output: Clone + Default + Send + 'static, T12::Output: Clone + Default + Send + 'static, T13::Output: Clone + Default + Send + 'static, T14::Output: Clone + Default + Send + 'static,

§

type Output = (<T0 as Merge>::Output, <T1 as Merge>::Output, <T2 as Merge>::Output, <T3 as Merge>::Output, <T4 as Merge>::Output, <T5 as Merge>::Output, <T6 as Merge>::Output, <T7 as Merge>::Output, <T8 as Merge>::Output, <T9 as Merge>::Output, <T10 as Merge>::Output, <T11 as Merge>::Output, <T12 as Merge>::Output, <T13 as Merge>::Output, <T14 as Merge>::Output)

source§

fn merge(self) -> Reactive<Self::Output>

source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> Merge for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)
where T0: Merge, T1: Merge, T2: Merge, T3: Merge, T4: Merge, T5: Merge, T6: Merge, T7: Merge, T8: Merge, T9: Merge, T10: Merge, T11: Merge, T12: Merge, T13: Merge, T14: Merge, T15: Merge, T0::Output: Clone + Default + Send + 'static, T1::Output: Clone + Default + Send + 'static, T2::Output: Clone + Default + Send + 'static, T3::Output: Clone + Default + Send + 'static, T4::Output: Clone + Default + Send + 'static, T5::Output: Clone + Default + Send + 'static, T6::Output: Clone + Default + Send + 'static, T7::Output: Clone + Default + Send + 'static, T8::Output: Clone + Default + Send + 'static, T9::Output: Clone + Default + Send + 'static, T10::Output: Clone + Default + Send + 'static, T11::Output: Clone + Default + Send + 'static, T12::Output: Clone + Default + Send + 'static, T13::Output: Clone + Default + Send + 'static, T14::Output: Clone + Default + Send + 'static, T15::Output: Clone + Default + Send + 'static,

§

type Output = (<T0 as Merge>::Output, <T1 as Merge>::Output, <T2 as Merge>::Output, <T3 as Merge>::Output, <T4 as Merge>::Output, <T5 as Merge>::Output, <T6 as Merge>::Output, <T7 as Merge>::Output, <T8 as Merge>::Output, <T9 as Merge>::Output, <T10 as Merge>::Output, <T11 as Merge>::Output, <T12 as Merge>::Output, <T13 as Merge>::Output, <T14 as Merge>::Output, <T15 as Merge>::Output)

source§

fn merge(self) -> Reactive<Self::Output>

Implementors§

source§

impl<T> Merge for &Reactive<T>
where T: Clone + Default + Send + 'static,

§

type Output = T