ouroboros-consensus-0.1.0.0: Consensus layer for the Ouroboros blockchain protocol
Safe HaskellNone
LanguageHaskell2010

Ouroboros.Consensus.Storage.FS.CRC

Description

Support for CRC

Synopsis

Wrap digest functionality

newtype CRC Source #

Constructors

CRC 

Fields

Instances

Instances details
Eq CRC Source # 
Instance details

Defined in Ouroboros.Consensus.Storage.FS.CRC

Methods

(==)CRCCRCBool Source #

(/=)CRCCRCBool Source #

Show CRC Source # 
Instance details

Defined in Ouroboros.Consensus.Storage.FS.CRC

Methods

showsPrecIntCRCShowS Source #

showCRCString Source #

showList ∷ [CRC] → ShowS Source #

Generic CRC Source # 
Instance details

Defined in Ouroboros.Consensus.Storage.FS.CRC

Associated Types

type Rep CRCTypeType Source #

Methods

fromCRCRep CRC x Source #

toRep CRC x → CRC Source #

Storable CRC Source # 
Instance details

Defined in Ouroboros.Consensus.Storage.FS.CRC

Methods

sizeOfCRCInt Source #

alignmentCRCInt Source #

peekElemOffPtr CRCIntIO CRC Source #

pokeElemOffPtr CRCIntCRCIO () Source #

peekByteOffPtr b → IntIO CRC Source #

pokeByteOffPtr b → IntCRCIO () Source #

peekPtr CRCIO CRC Source #

pokePtr CRCCRCIO () Source #

NoThunks CRC Source # 
Instance details

Defined in Ouroboros.Consensus.Storage.FS.CRC

Methods

noThunks ∷ Context → CRCIO (Maybe ThunkInfo) #

wNoThunks ∷ Context → CRCIO (Maybe ThunkInfo) #

showTypeOfProxy CRCString #

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.0-inplace" 'True) (C1 ('MetaCons "CRC" 'PrefixI 'True) (S1 ('MetaSel ('Just "getCRC") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word32)))

computeCRC ∷ ∀ a. CRC32 a ⇒ a → CRC Source #

updateCRC ∷ ∀ a. CRC32 a ⇒ a → CRCCRC Source #

File system functions with CRC functionality

hGetAllAtCRC Source #

Arguments

∷ ∀ 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

∷ ∀ 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 ∷ ∀ m h. (HasCallStack, Monad m) ⇒ HasFS m h → Handle h → ByteString → m (Word64, CRC) Source #

Variation on hPutAll that also computes a CRC