Expand description
Trait for cloning data into a shared memory buffer.
This module contains the SharedMemoryBuilder type and ToShmem trait.
We put them here (and not in style_traits) so that we can derive ToShmem from the selectors and style crates.
Macros§
Structs§
- Shared
Memory Builder - A builder object that transforms and copies values into a fixed size buffer.
Traits§
- ToShmem
- A type that can be copied into a SharedMemoryBuilder.
Functions§
- padded_
size 🔒 - Rounds up
size
so that the following address will satisfyalign
. - padding_
needed_ 🔒for - Amount of padding needed after
size
bytes to ensure that the following address will satisfyalign
. - to_
shmem_ ⚠slice - Writes all the items in
src
into a slice in the shared memory buffer and returns a pointer to the slice. - to_
shmem_ 🔒 ⚠slice_ ptr - Converts all the items in
src
into shared memory form, writes them into the specified buffer, and returns a pointer to the slice.
Type Aliases§
- Result
- Result type for ToShmem::to_shmem.