flex_alloc::storage

Trait RawBuffer

Source
pub trait RawBuffer: Sized {
    type RawData: ?Sized;

    // Required methods
    fn data_ptr(&self) -> *const Self::RawData;
    fn data_ptr_mut(&mut self) -> *mut Self::RawData;
}
Expand description

Provide access to the associated data for abstract buffer types.

Required Associated Types§

Source

type RawData: ?Sized

The concrete data type.

Required Methods§

Source

fn data_ptr(&self) -> *const Self::RawData

Access the data as a readonly pointer.

Source

fn data_ptr_mut(&mut self) -> *mut Self::RawData

Access the data as a mutable pointer.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<'a, T: 'a, const N: usize> RawBuffer for InlineBuffer<T, N>

Source§

impl<T, H: BufferHeader<T>, A: Allocator> RawBuffer for ThinBuffer<T, H, A>

Source§

impl<T: ?Sized, H: BufferHeader<T>, A: Allocator> RawBuffer for FatBuffer<T, H, A>