[][src]Struct soak::RawTable

pub struct RawTable<T: Columns> { /* fields omitted */ }

A raw allocation containing parallel arrays of T's fields.

Much like std's RawVec, RawTable manages an allocation for a collection, but without managing the initialization or dropping of its contents. RawTable does not deal directly with elements of type T, but with multiple adjacent arrays of T's fields, shared in a single allocation.

Methods

impl<T: Columns> RawTable<T>[src]

pub fn with_capacity(capacity: usize) -> Self[src]

Create a RawTable with enough space for capacity elements of each field type.

Panics

Panics if the requested capacity exceeds usize::MAX bytes.

Aborts

Aborts on OOM.

pub fn ptr<F>(&mut self, field: Field<T, F>) -> *mut F[src]

Get a pointer to a field array.

pub fn capacity(&self) -> usize[src]

Get the capacity of the allocation.

pub fn reserve_exact(&mut self, used: usize, extra: usize)[src]

Ensure that the table contains enough space for used + extra elements.

Panics

Panics if the requested capacity exceeds usize::MAX bytes.

Aborts

Aborts on OOM.

Trait Implementations

impl<T: Columns> Default for RawTable<T>[src]

fn default() -> Self[src]

Create a RawTable without allocating.

impl<T: Columns> Drop for RawTable<T>[src]

fn drop(&mut self)[src]

Free the underlying buffer but do not drop the arrays' elements.

Auto Trait Implementations

impl<T> Send for RawTable<T> where
    T: Send,
    <T as Columns>::Pointers: Send

impl<T> Sync for RawTable<T> where
    T: Sync,
    <T as Columns>::Pointers: Sync

impl<T> Unpin for RawTable<T> where
    T: Unpin,
    <T as Columns>::Pointers: Unpin

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.