pub struct StorageArc<T>(/* private fields */);Implementations§
Source§impl<T: WithDType> StorageArc<T>
impl<T: WithDType> StorageArc<T>
pub fn new(storage: Storage<T>) -> Self
pub fn read(&self) -> RwLockReadGuard<'_, Storage<T>>
pub fn write(&self) -> RwLockWriteGuard<'_, Storage<T>>
pub fn get(&self, index: usize) -> Option<T>
pub fn set(&mut self, index: usize, val: T) -> Option<()>
pub fn get_unchecked(&self, index: usize) -> T
pub fn set_unchecked(&self, index: usize, val: T)
pub fn ptr_eq(this: &Self, other: &Self) -> bool
pub fn get_ref(&self, start_offset: usize) -> StorageRef<'_, T>
pub fn get_mut(&self, start_offset: usize) -> StorageMut<'_, T>
pub fn get_ptr(&self, start_offset: usize) -> *mut T
Trait Implementations§
Source§impl<T: Clone> Clone for StorageArc<T>
impl<T: Clone> Clone for StorageArc<T>
Source§fn clone(&self) -> StorageArc<T>
fn clone(&self) -> StorageArc<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<T> Freeze for StorageArc<T>
impl<T> RefUnwindSafe for StorageArc<T>
impl<T> Send for StorageArc<T>
impl<T> Sync for StorageArc<T>
impl<T> Unpin for StorageArc<T>
impl<T> UnwindSafe for StorageArc<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