pub struct Column<T: Copy + Default> { /* private fields */ }Implementations§
Source§impl<T: Copy + Default> Column<T>
impl<T: Copy + Default> Column<T>
pub fn new(size: usize) -> Self
pub fn from_vec(data: Vec<T>) -> Self
Sourcepub fn get(&self, id: u32) -> T
pub fn get(&self, id: u32) -> T
value of a slot (column[id]). out of range reads return the default value (undefined -> 0)
Sourcepub fn set(&self, id: u32, value: T)
pub fn set(&self, id: u32, value: T)
write a slot (column[id] = value). out of range writes are ignored, like typed arrays
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Sourcepub fn as_ptr(&self) -> *const T
pub fn as_ptr(&self) -> *const T
pointer to the data, for the javascript typed array views. valid until the next resize / replace
Sourcepub fn as_mut_ptr(&self) -> *mut T
pub fn as_mut_ptr(&self) -> *mut T
mutable pointer to the data, for the javascript typed array views
Auto Trait Implementations§
impl<T> !Freeze for Column<T>
impl<T> !RefUnwindSafe for Column<T>
impl<T> !Sync for Column<T>
impl<T> Forget for Column<T>
impl<T> Move for Column<T>
impl<T> Send for Column<T>
impl<T> Unpin for Column<T>
impl<T> UnsafeUnpin for Column<T>
impl<T> UnwindSafe for Column<T>
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