poke package:store

Serializes a value to bytes. It is the responsibility of the caller to ensure that at least the number of bytes required by size are available. These details are handled by encode and similar utilities.
Serializes a value to bytes. It is the responsibility of the caller to ensure that at least the number of bytes required by size are available. These details are handled by encode and similar utilities.
Poke actions are useful for building sequential serializers. They are actions which write values to bytes into memory specified by a Ptr base. The Applicative and Monad instances make it easy to write serializations, by keeping track of the Offset of the current byte. They allow you to chain Poke action such that subsequent Pokes write into subsequent portions of the output.
Throws a PokeException. These should be avoided when possible, they usually indicate a programming error.
Implement poke for an IsMap of where both ContainerKey and MapValue are Store instances.
Like pokeMap but should only be used for ordered containers where mapToList returns an ascending list.
Implement poke for an IsSequence of Store instances. Note that many monomorphic containers have more efficient implementations (for example, via memcpy).
Implement poke for an IsSequence of Store instances.
Exception thrown while running poke. Note that other types of exceptions could also be thrown. Invocations of fail in the Poke monad causes this exception to be thrown. PokeExceptions are not expected to occur in ordinary circumstances, and usually indicate a programming error.