Module
Node.Buffer.ST
- Package
- purescript-node-buffer
- Repository
- purescript-node/purescript-node-buffer
#run Source
run :: (forall h. ST h (STBuffer h)) -> ImmutableBufferRuns an ST creating an STBuffer then freezes the (STBuffer h) and returns
it, without unneccessary copying.
#allocUnsafe Source
allocUnsafe :: forall h. Int -> ST h (STBuffer h)Creates a new STBuffer of the specified size. Unsafe because it reuses memory from a pool
and may contain sensitive data. See the Node docs:
https://nodejs.org/docs/latest-v18.x/api/buffer.html#what-makes-bufferallocunsafe-and-bufferallocunsafeslow-unsafe
#allocUnsafeSlow Source
allocUnsafeSlow :: forall h. Int -> ST h (STBuffer h)Creates a new STBuffer of the specified size. Unsafe because it reuses memory from a pool
and may contain sensitive data. See the Node docs:
https://nodejs.org/docs/latest-v18.x/api/buffer.html#what-makes-bufferallocunsafe-and-bufferallocunsafeslow-unsafe
#unsafeFreeze Source
unsafeFreeze :: forall h. STBuffer h -> ST h ImmutableBuffer#unsafeThaw Source
unsafeThaw :: forall h. ImmutableBuffer -> ST h (STBuffer h)#fromArrayBuffer Source
fromArrayBuffer :: forall h. ArrayBuffer -> ST h (STBuffer h)#toArrayBuffer Source
toArrayBuffer :: forall h. STBuffer h -> ST h ArrayBuffer