[−][src]Struct soak::RawTable
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
Auto Trait Implementations
impl<T> Send for RawTable<T> where
T: Send,
<T as Columns>::Pointers: Send,
T: Send,
<T as Columns>::Pointers: Send,
impl<T> Sync for RawTable<T> where
T: Sync,
<T as Columns>::Pointers: Sync,
T: Sync,
<T as Columns>::Pointers: Sync,
impl<T> Unpin for RawTable<T> where
T: Unpin,
<T as Columns>::Pointers: Unpin,
T: Unpin,
<T as Columns>::Pointers: Unpin,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,