vulkan-3.6.3: Bindings to the Vulkan graphics API.
Safe HaskellNone
LanguageHaskell2010

Vulkan.CStruct.Utils

Synopsis

Documentation

pokeFixedLengthByteString :: forall n. KnownNat n => Ptr (FixedArray n Word8) -> ByteString -> IO () Source #

Store a ByteString in a fixed amount of space, truncating if necessary.

If the ByteString is not long enough to fill the space the remaining bytes are unchanged

pokeFixedLengthNullTerminatedByteString :: forall n. KnownNat n => Ptr (FixedArray n CChar) -> ByteString -> IO () Source #

Store a ByteString in a fixed amount of space inserting a null character at the end and truncating if necessary.

If the ByteString is not long enough to fill the space the remaining bytes are unchanged

Note that if the ByteString is exactly long enough the last byte will still be replaced with 0

peekByteStringFromSizedVectorPtr :: forall n. KnownNat n => Ptr (FixedArray n Word8) -> IO ByteString Source #

Peek a ByteString from a fixed sized array of bytes

lowerArrayPtr :: forall a n. Ptr (FixedArray n a) -> Ptr a Source #

Get the pointer to the first element in the array

advancePtrBytes :: Ptr a -> Int -> Ptr a Source #

A type restricted plusPtr

data FixedArray (n :: Nat) (a :: Type) Source #

An unpopulated type intended to be used as in Ptr (FixedArray n a) to indicate that the pointer points to an array of n as