ouroboros-consensus-0.1.0.1: Consensus layer for the Ouroboros blockchain protocol
Safe Haskell None
Language Haskell2010

Ouroboros.Consensus.Storage.FS.CRC

Description

Support for CRC

Synopsis

Wrap digest functionality

newtype CRC Source #

Constructors

CRC

Instances

Instances details
Eq CRC Source #
Instance details

Defined in Ouroboros.Consensus.Storage.FS.CRC

Show CRC Source #
Instance details

Defined in Ouroboros.Consensus.Storage.FS.CRC

Generic CRC Source #
Instance details

Defined in Ouroboros.Consensus.Storage.FS.CRC

Associated Types

type Rep CRC :: Type -> Type Source #

Storable CRC Source #
Instance details

Defined in Ouroboros.Consensus.Storage.FS.CRC

NoThunks CRC Source #
Instance details

Defined in Ouroboros.Consensus.Storage.FS.CRC

type Rep CRC Source #
Instance details

Defined in Ouroboros.Consensus.Storage.FS.CRC

type Rep CRC = D1 (' MetaData "CRC" "Ouroboros.Consensus.Storage.FS.CRC" "ouroboros-consensus-0.1.0.1-DT4Cvwf63DZKctsEvaJqCU" ' True ) ( C1 (' MetaCons "CRC" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "getCRC") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Word32 )))

File system functions with CRC functionality

hGetAllAtCRC Source #

Arguments

:: forall m h. Monad m
=> HasFS m h
-> Handle h
-> AbsOffset

The offset at which to read.

-> m ( ByteString , CRC )

Variation on hGetAllAt that also computes a CRC

hGetExactlyAtCRC Source #

Arguments

:: forall m h. ( HasCallStack , MonadThrow m)
=> HasFS m h
-> Handle h
-> Word64

The number of bytes to read.

-> AbsOffset

The offset at which to read.

-> m ( ByteString , CRC )

Variation on hGetExactlyAt that also computes a CRC

hPutAllCRC :: forall m h. ( HasCallStack , Monad m) => HasFS m h -> Handle h -> ByteString -> m ( Word64 , CRC ) Source #

Variation on hPutAll that also computes a CRC