pub fn zip<SigRHS>(&self, rhs: &Stream<'a, SigRHS>) -> Stream<'a, Either<Sig, SigRHS>>
  where
    Sig: Clone,
    SigRHS: 'a + Clone,
  {
    let zipped = Stream::new();
    let zipped_self = zipped.new_same();
    let zipped_rhs = zipped.new_same();

    self.observe(move |sig| {
      zipped_self.send(&Either::Left(sig.clone()));
    });

    rhs.observe(move |sig| {
      zipped_rhs.send(&Either::Right(sig.clone()));
    });

    zipped
  }
/// Zip two streams with each other.
///
/// The resulting stream will output [`Either`] from one or the other stream.
Zip two streams with each other.
The resulting stream will output [`Either`] from one or the other stream.
Zip two streams with each other . The resulting stream will output [ ` Either ` ] from one or the other stream .
pub fn zip<SigRHS>(&self, rhs: &Stream<'a, SigRHS>) -> Stream<'a, Either<Sig, SigRHS>>
  where
    Sig: Clone,
    SigRHS: 'a + Clone,
  {
    let zipped = Stream::new();
    let zipped_self = zipped.new_same();
    let zipped_rhs = zipped.new_same();
    self.observe(move |sig| {
      zipped_self.send(&Either::Left(sig.clone()));
    });
    rhs.observe(move |sig| {
      zipped_rhs.send(&Either::Right(sig.clone()));
    });
    zipped
  }
pub fn zip < SigRHS > ( & self , rhs : & Stream < ' a , SigRHS > ) -> Stream < ' a , Either < Sig , SigRHS > > where Sig : Clone , SigRHS : ' a + Clone , { let zipped = Stream :: new ( ) ; let zipped_self = zipped . new_same ( ) ; let zipped_rhs = zipped . new_same ( ) ; self . observe ( move | sig | { zipped_self . send ( & Either :: Left ( sig . clone ( ) ) ) ; } ) ; rhs . observe ( move | sig | { zipped_rhs . send ( & Either :: Right ( sig . clone ( ) ) ) ; } ) ; zipped }
Zip two streams with each other.
Zip two streams with each other .
&self
rhs
&Stream<'a, SigRHS>
&self
rhs
&Stream<'a, SigRHS>