Crate to_shmem

Source
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§

impl_trivial_to_shmem

Structs§

SharedMemoryBuilder
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 satisfy align.
padding_needed_for 🔒
Amount of padding needed after size bytes to ensure that the following address will satisfy align.
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.