( self: Stream.Stream<A, E, R> )
| 7071 | |
| 7072 | /** @internal */ |
| 7073 | export const toPull = <A, E, R>( |
| 7074 | self: Stream.Stream<A, E, R> |
| 7075 | ): Effect.Effect<Effect.Effect<Chunk.Chunk<A>, Option.Option<E>, R>, never, R | Scope.Scope> => |
| 7076 | Effect.map(channel.toPull(toChannel(self)), (pull) => |
| 7077 | pipe( |
| 7078 | pull, |
| 7079 | Effect.mapError(Option.some), |
| 7080 | Effect.flatMap(Either.match({ |
| 7081 | onLeft: () => Effect.fail(Option.none()), |
| 7082 | onRight: Effect.succeed |
| 7083 | })) |
| 7084 | )) |
| 7085 | |
| 7086 | /** @internal */ |
| 7087 | export const toQueue = dual< |