pub fn merge_with<F, SigRHS>(&self, rhs: &Stream<'a, SigRHS>, adapter: F) -> Self
  where
    F: 'a + Fn(&SigRHS) -> Sig,
    SigRHS: 'a,
  {
    let merged = Stream::new();
    let merged_self = merged.new_same();
    let merged_rhs = merged.new_same();

    self.observe(move |sig| {
      merged_self.send(sig);
    });

    rhs.observe(move |sig| {
      merged_rhs.send(&adapter(sig));
    });

    merged
  }
/// Merge two streams into one with incompatible types.
///
/// This method performs the same logical operation as:
///
/// ```rust
/// use bidule::Stream;
///
/// let stream_a = Stream::new();
/// let stream_b = Stream::new();
/// let merged = stream_a.merge(&stream_b.map(String::len));
/// ```
///
/// However, because it does it in a more optimal way, you are advised to use this combinator
/// instead.
Merge two streams into one with incompatible types.
This method performs the same logical operation as.

```rust
use bidule::Stream.



However, because it does it in a more optimal way, you are advised to use this combinator
instead.
Merge two streams into one with incompatible types . This method performs the same logical operation as . ` ` ` rust use bidule :: Stream . However because it does it in a more optimal way you are advised to use this combinator instead .
pub fn merge_with<F, SigRHS>(&self, rhs: &Stream<'a, SigRHS>, adapter: F) -> Self
  where
    F: 'a + Fn(&SigRHS) -> Sig,
    SigRHS: 'a,
  {
    let merged = Stream::new();
    let merged_self = merged.new_same();
    let merged_rhs = merged.new_same();
    self.observe(move |sig| {
      merged_self.send(sig);
    });
    rhs.observe(move |sig| {
      merged_rhs.send(&adapter(sig));
    });
    merged
  }
pub fn merge_with < F , SigRHS > ( & self , rhs : & Stream < ' a , SigRHS > , adapter : F ) -> Self where F : ' a + Fn ( & SigRHS ) -> Sig , SigRHS : ' a , { let merged = Stream :: new ( ) ; let merged_self = merged . new_same ( ) ; let merged_rhs = merged . new_same ( ) ; self . observe ( move | sig | { merged_self . send ( sig ) ; } ) ; rhs . observe ( move | sig | { merged_rhs . send ( & adapter ( sig ) ) ; } ) ; merged }
Merge two streams into one with incompatible types.
Merge two streams into one with incompatible types .
&self
rhs
&Stream<'a, SigRHS>
adapter
F
&self
rhs
&Stream<'a, SigRHS>
adapter
F