Module space

Module space 

Source
Expand description

Smart pointers with safe atom reading and writing methods.

§Safety

The only unsafe things that happen in this module is when either space is created from a reference to a sys::LV2_Atom and when space is re-interpreted as typed data.

In the first case, we have to trust that the space behind the atom header is accessible since we have no way to check whether it is or not. Therefore, we have to assume that it is sound.

The second case is sound since a) the data is contained in a slice and therefore is accessible, b) generic type parameter bounds assure that the type is plain-old-data and c) 64-bit padding is assured.

Structs§

FramedMutSpace
A MutSpace that notes the amount of allocated space in an atom header.
RootMutSpace
A MutSpace that directly manages it’s own internal data slice.
Space
Specialized smart pointer to retrieve struct instances from a slice of memory.
SpaceElement
Linked list element for dynamic atom writing.
SpaceHead
A mutable space that dynamically allocates memory.

Traits§

MutSpace
A smart pointer that writes atom data to an internal slice.