Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Contains functions for constructing and working with foreign simdjson instances.
Synopsis
- getDocumentInfo :: Document -> IO (Text, Text)
- mkSIMDParser :: Maybe Int -> IO (ForeignPtr SIMDParser)
- mkSIMDDocument :: IO (ForeignPtr SIMDDocument)
- mkSIMDPaddedStr :: ByteString -> IO (ForeignPtr PaddedString)
- withInputBuffer :: ByteString -> (InputBuffer -> IO a) -> IO a
Documentation
getDocumentInfo :: Document -> IO (Text, Text) Source #
Read the document location and debug string. If the iterator is out of bounds then we abort reading from the iterator buffers to prevent reading garbage.
mkSIMDParser :: Maybe Int -> IO (ForeignPtr SIMDParser) Source #
mkSIMDPaddedStr :: ByteString -> IO (ForeignPtr PaddedString) Source #
withInputBuffer :: ByteString -> (InputBuffer -> IO a) -> IO a Source #
Construct a simdjson:padded_string from a Haskell ByteString
, and pass
it to an IO action. The instance lifetime is managed by the bracket
function.