Copyright | (c) 2019 Edward Kmett |
---|---|
License | BSD-2-Clause OR Apache-2.0 |
Maintainer | Edward Kmett <ekmett@gmail.com> |
Stability | experimental |
Portability | non-portable |
Safe Haskell | Trustworthy |
Language | Haskell2010 |
Synopsis
- data ConstByteArray s
- constByteArray :: AByteArray p => p s -> ConstByteArray s
- type AByteArray = Constable ConstByteArray
- readAByteArray :: forall a m p. (Prim a, PrimMonad m, AByteArray p) => p (PrimState m) -> Int -> m a
- sameByteArray :: forall s p q. (AByteArray p, AByteArray q) => p s -> q s -> Bool
- copyAByteArray :: forall m p. (AByteArray p, PrimMonad m) => MutableByteArray (PrimState m) -> Int -> p (PrimState m) -> Int -> Int -> m ()
- copyAByteArrayToAddr :: forall m p. (AByteArray p, PrimMonad m) => Addr -> p (PrimState m) -> Int -> Int -> m ()
- moveAByteArray :: forall m p. (AByteArray p, PrimMonad m) => MutableByteArray (PrimState m) -> Int -> p (PrimState m) -> Int -> Int -> m ()
- sizeofAByteArray :: forall s p. AByteArray p => p s -> Int
- getSizeofAByteArray :: forall m p. (PrimMonad m, AByteArray p) => p (PrimState m) -> m Int
- isAByteArrayPinned :: forall s p. AByteArray p => p s -> Bool
- constByteArrayContents :: forall s p. AByteArray p => p s -> ConstPtr Word8
Documentation
data ConstByteArray s Source #
Instances
Eq (ConstByteArray s) Source # | |
Defined in Data.Const.Unsafe (==) :: ConstByteArray s -> ConstByteArray s -> Bool # (/=) :: ConstByteArray s -> ConstByteArray s -> Bool # | |
Constable ConstByteArray MutableByteArray Source # | |
Defined in Data.Const.Unsafe | |
Constable ConstByteArray ConstByteArray Source # | |
Defined in Data.Const.Unsafe |
constByteArray :: AByteArray p => p s -> ConstByteArray s Source #
type AByteArray = Constable ConstByteArray Source #
readAByteArray :: forall a m p. (Prim a, PrimMonad m, AByteArray p) => p (PrimState m) -> Int -> m a Source #
sameByteArray :: forall s p q. (AByteArray p, AByteArray q) => p s -> q s -> Bool Source #
copyAByteArray :: forall m p. (AByteArray p, PrimMonad m) => MutableByteArray (PrimState m) -> Int -> p (PrimState m) -> Int -> Int -> m () Source #
copyAByteArrayToAddr :: forall m p. (AByteArray p, PrimMonad m) => Addr -> p (PrimState m) -> Int -> Int -> m () Source #
moveAByteArray :: forall m p. (AByteArray p, PrimMonad m) => MutableByteArray (PrimState m) -> Int -> p (PrimState m) -> Int -> Int -> m () Source #
sizeofAByteArray :: forall s p. AByteArray p => p s -> Int Source #
getSizeofAByteArray :: forall m p. (PrimMonad m, AByteArray p) => p (PrimState m) -> m Int Source #
isAByteArrayPinned :: forall s p. AByteArray p => p s -> Bool Source #
constByteArrayContents :: forall s p. AByteArray p => p s -> ConstPtr Word8 Source #
Only safe on a pinned ByteArray or pinned ConstByteArray