const-0: Read-only mutable primitives

Copyright(c) 2019 Edward Kmett
LicenseBSD-2-Clause OR Apache-2.0
MaintainerEdward Kmett <ekmett@gmail.com>
Stabilityexperimental
Portabilitynon-portable
Safe HaskellTrustworthy
LanguageHaskell2010

Data.Const.Primitive.ByteArray

Description

 
Synopsis

Documentation

data ConstByteArray s Source #

Instances
Eq (ConstByteArray s) Source # 
Instance details

Defined in Data.Const.Unsafe

Constable ConstByteArray MutableByteArray Source # 
Instance details

Defined in Data.Const.Unsafe

Constable ConstByteArray ConstByteArray Source # 
Instance details

Defined in Data.Const.Unsafe

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