Merge pull request #4 from BeFunctional/edsko/export-withBorshBufferOfInitSize

Export `withBorshBufferOfInitSize`
This commit is contained in:
Edsko de Vries 2023-03-23 10:13:07 +00:00 committed by GitHub
commit 4e65e10b96
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -12,6 +12,7 @@ module Foreign.Rust.Marshall.Variable (
, getVarBuffer , getVarBuffer
, withBorshVarBuffer , withBorshVarBuffer
, withBorshFailure , withBorshFailure
, withBorshBufferOfInitSize
-- ** Pure variants -- ** Pure variants
, withPureBorshVarBuffer , withPureBorshVarBuffer
, withPureBorshFailure , withPureBorshFailure
@ -103,10 +104,10 @@ withPureBorshFailure :: forall a.
withPureBorshFailure = unsafePerformIO . withBorshFailure withPureBorshFailure = unsafePerformIO . withBorshFailure
{------------------------------------------------------------------------------- {-------------------------------------------------------------------------------
Internal auxiliary Generalization
-------------------------------------------------------------------------------} -------------------------------------------------------------------------------}
-- | Generalization of 'withBorshVarBuffer' and 'withMaxBorshBuffer' -- | Variation on 'withBorshVarBuffer' with user-specified initial buffer size
withBorshBufferOfInitSize :: forall a. withBorshBufferOfInitSize :: forall a.
( FromBorsh a ( FromBorsh a
, StaticBorshSize a ~ 'HasVariableSize , StaticBorshSize a ~ 'HasVariableSize