Lines Matching full:either
1 //! Module defining an Either type.
40 /// When the output type is the same, we can wrap each future in `Either` to avoid the
44 /// use tokio_util::either::Either;
52 /// Either::Left(some_async_function())
54 /// Either::Right(other_async_function())
64 pub enum Either<L, R> { enum
70 … It takes an invocation of method as an argument (e.g. `self.poll(cx)`), and redirects it to either
83 impl<L, R, O> Future for Either<L, R> implementation
95 impl<L, R> AsyncRead for Either<L, R> implementation
109 impl<L, R> AsyncBufRead for Either<L, R> implementation
123 impl<L, R> AsyncSeek for Either<L, R> implementation
137 impl<L, R> AsyncWrite for Either<L, R> implementation
155 impl<L, R> futures_core::stream::Stream for Either<L, R> implementation
175 let mut either: Either<Once<u32>, Once<u32>> = Either::Left(once(1)); in either_is_stream() localVariable
177 assert_eq!(Some(1u32), either.next().await); in either_is_stream()
183 let mut either: Either<Repeat, Repeat> = Either::Right(repeat(0b101)); in either_is_async_read() localVariable
185 either.read_exact(&mut buffer).await.unwrap(); in either_is_async_read()