roshask-0.2.1: Haskell support for the ROS robotics framework.

Safe HaskellNone
LanguageHaskell2010

Ros.Internal.Util.BytesToVector

Synopsis

Documentation

unsafeBytesToVector :: Storable a => Int -> ByteString -> Vector a Source

Construct a Vector with the specified number of elements from a strict ByteString without copying.

bytesToVectorL :: Storable a => Int -> ByteString -> Vector a Source

Construct a Vector with the specified number of elements from a lazy ByteString.

bytesToVector :: Storable a => Int -> ByteString -> Vector a Source

Construct a Vector with the specified number of elements from a strict ByteString making a copy of the underlying data in the process.

unsafeVectorToBytes :: forall a. Storable a => Vector a -> ByteString Source

Construct a strict ByteString from a Vector without copying the underlying data.

vectorToBytes :: forall a. Storable a => Vector a -> ByteString Source

Construct a strict ByteString from a copy of the data underlying a Vector.