ecluse:ecluse-core
Safe HaskellNone
LanguageGHC2021

Ecluse.Core.Registry.Metadata.RecordStream

Description

Charged LF framing keeps native consumers responsible for record syntax and state.

Synopsis

Documentation

recordSteps :: Monad m => (s -> Int -> ByteString -> m Int) -> (s -> Int -> ByteString -> Either LimitError s) -> (s -> Steps m a) -> s -> Steps m a Source #

Charge fragments before retention and consume every physical record through EOF.

recordFragmentCharge :: Int -> ByteString -> Int Source #

The workspace of a partly buffered record once it holds this fragment: what earlier fragments reserved, plus the fragment's decode and buffer charges, saturated at maxBound.

finishRecordSteps :: Monad m => Steps m a -> m (Steps m a) Source #

Close an unterminated final record without inventing a source byte.