Module

Node.Stream.Readable

Package
purescript-node-readable
Repository
matthewleon/purescript-node-readable

#Readable Source

newtype Readable chunktype r eff

A readable stream parameterized by the type of its chunks

Instances

#Region Source

data Region :: Type

#ReadCb Source

type ReadCb chunktype r p eff = Readable chunktype r eff -> Size -> Eff (push :: Push p | eff) Unit

The read callback for readable streams

#Size Source

type Size = Int

#Push Source

data Push :: Region -> Effect

We use a phantom parameter to contain use of push

#newReadable Source

newReadable :: forall eff p r chunktype. Chunkable chunktype => ReadCb chunktype r p eff -> Eff eff (Readable chunktype r eff)

#newReadable' Source

newReadable' :: forall eff p r chunktype rest optionsrow. Union optionsrow rest (StreamOptions eff) => Chunkable chunktype => Record optionsrow -> ReadCb chunktype r p eff -> Eff eff (Readable chunktype r eff)

#repeat Source

repeat :: forall eff r chunktype. Chunkable chunktype => chunktype -> Eff eff (Readable chunktype r eff)

#repeat' Source

repeat' :: forall eff r chunktype rest optionsrow. Union optionsrow rest (StreamOptions eff) => Chunkable chunktype => Record optionsrow -> chunktype -> Eff eff (Readable chunktype r eff)

#iterate Source

iterate :: forall eff r iterstate chunktype. Chunkable chunktype => (iterstate -> Tuple iterstate chunktype) -> iterstate -> Eff (ref :: REF | eff) (Readable chunktype r (ref :: REF | eff))

#iterate' Source

iterate' :: forall eff r iterstate chunktype rest optionsrow. Union optionsrow rest (StreamOptions (ref :: REF | eff)) => Chunkable chunktype => Record optionsrow -> (iterstate -> Tuple iterstate chunktype) -> iterstate -> Eff (ref :: REF | eff) (Readable chunktype r (ref :: REF | eff))

#unfoldr Source

unfoldr :: forall eff r iterstate chunktype. Chunkable chunktype => (iterstate -> Maybe (Tuple chunktype iterstate)) -> iterstate -> Eff (ref :: REF | eff) (Readable chunktype r (ref :: REF | eff))

#unfoldr' Source

unfoldr' :: forall eff r iterstate chunktype rest optionsrow. Union optionsrow rest (StreamOptions (ref :: REF | eff)) => Chunkable chunktype => Record optionsrow -> (iterstate -> Maybe (Tuple chunktype iterstate)) -> iterstate -> Eff (ref :: REF | eff) (Readable chunktype r (ref :: REF | eff))

#push Source

push :: forall eff p r chunktype. Readable chunktype r eff -> chunktype -> Eff (push :: Push p | eff) Boolean

#pushStringWithEncoding Source

pushStringWithEncoding :: forall eff p r. Readable String r eff -> String -> Encoding -> Eff (push :: Push p | eff) Boolean

#pushEnd Source

pushEnd :: forall eff p r chunktype. Readable chunktype r eff -> Eff (push :: Push p | eff) Unit

#pipe Source

pipe :: forall eff r w chunktype. Readable chunktype w eff -> Writable r eff -> Eff eff (Writable r eff)