memory-0.15.0: memory and related abstraction stuff
LicenseBSD-style
MaintainerVincent Hanquez <vincent@snarc.org>
Stabilitystable
PortabilityGood
Safe HaskellNone
LanguageHaskell2010

Data.ByteArray.MemView

Description

 
Synopsis

Documentation

data MemView Source #

A simple abstraction to a piece of memory.

Do beware that garbage collection related to piece of memory could be triggered before this is used.

Only use with the appropriate handler has been used (e.g. withForeignPtr on ForeignPtr)

Constructors

MemView !(Ptr Word8) !Int 

Instances

Instances details
Eq MemView Source # 
Instance details

Defined in Data.ByteArray.MemView

Show MemView Source # 
Instance details

Defined in Data.ByteArray.MemView

ByteArrayAccess MemView Source # 
Instance details

Defined in Data.ByteArray.MemView

memViewPlus :: MemView -> Int -> MemView Source #

Increase the memory view while reducing the size of the window

this is useful as an abtraction to represent the current offset in a buffer, and the remaining bytes left.