( self: Stream.Stream<A, E, R> )
| 7109 | |
| 7110 | /** @internal */ |
| 7111 | export const toPull = <A, E, R>( |
| 7112 | self: Stream.Stream<A, E, R> |
| 7113 | ): Effect.Effect<Effect.Effect<Chunk.Chunk<A>, Option.Option<E>, R>, never, R | Scope.Scope> => |
| 7114 | Effect.map(channel.toPull(toChannel(self)), (pull) => |
| 7115 | pipe( |
| 7116 | pull, |
| 7117 | Effect.mapError(Option.some), |
| 7118 | Effect.flatMap(Either.match({ |
| 7119 | onLeft: () => Effect.fail(Option.none()), |
| 7120 | onRight: Effect.succeed |
| 7121 | })) |
| 7122 | )) |
| 7123 | |
| 7124 | /** @internal */ |
| 7125 | export const toQueue = dual< |