pub struct Arena {
pub size: usize,
/* private fields */
}Fields§
§size: usizeImplementations§
Source§impl Arena
impl Arena
pub fn from_plan(plan: &MemoryPlan) -> Result<Self, String>
pub fn has(&self, id: NodeId) -> bool
Sourcepub fn elem_offset(&self, id: NodeId) -> u32
pub fn elem_offset(&self, id: NodeId) -> u32
Element offset (f32) of a node’s slot — what the kernels index by.
pub fn write_f32(&self, id: NodeId, data: &[f32])
pub fn write_bytes(&self, id: NodeId, data: &[u8])
pub fn read_f32(&self, id: NodeId, n: usize) -> Vec<f32>
pub fn read_bytes(&self, id: NodeId, nbytes: usize) -> Vec<u8> ⓘ
Trait Implementations§
Auto Trait Implementations§
impl !Sync for Arena
impl Freeze for Arena
impl RefUnwindSafe for Arena
impl Unpin for Arena
impl UnsafeUnpin for Arena
impl UnwindSafe for Arena
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more