pub struct StoreHandle { /* private fields */ }Expand description
StoreHandle
Bound pair of row and index stores for one schema Store path.
Implementations§
Source§impl StoreHandle
impl StoreHandle
Sourcepub const fn new(
data: &'static LocalKey<RefCell<DataStore>>,
index: &'static LocalKey<RefCell<IndexStore>>,
) -> Self
pub const fn new( data: &'static LocalKey<RefCell<DataStore>>, index: &'static LocalKey<RefCell<IndexStore>>, ) -> Self
Build a store handle from thread-local row/index stores.
Sourcepub fn with_data<R>(&self, f: impl FnOnce(&DataStore) -> R) -> R
pub fn with_data<R>(&self, f: impl FnOnce(&DataStore) -> R) -> R
Borrow the row store immutably.
Sourcepub fn with_data_mut<R>(&self, f: impl FnOnce(&mut DataStore) -> R) -> R
pub fn with_data_mut<R>(&self, f: impl FnOnce(&mut DataStore) -> R) -> R
Borrow the row store mutably.
Sourcepub fn with_index<R>(&self, f: impl FnOnce(&IndexStore) -> R) -> R
pub fn with_index<R>(&self, f: impl FnOnce(&IndexStore) -> R) -> R
Borrow the index store immutably.
Sourcepub fn with_index_mut<R>(&self, f: impl FnOnce(&mut IndexStore) -> R) -> R
pub fn with_index_mut<R>(&self, f: impl FnOnce(&mut IndexStore) -> R) -> R
Borrow the index store mutably.
Sourcepub const fn data_store(&self) -> &'static LocalKey<RefCell<DataStore>>
pub const fn data_store(&self) -> &'static LocalKey<RefCell<DataStore>>
Return the raw row-store accessor.
Sourcepub const fn index_store(&self) -> &'static LocalKey<RefCell<IndexStore>>
pub const fn index_store(&self) -> &'static LocalKey<RefCell<IndexStore>>
Return the raw index-store accessor.
Trait Implementations§
Source§impl Clone for StoreHandle
impl Clone for StoreHandle
Source§fn clone(&self) -> StoreHandle
fn clone(&self) -> StoreHandle
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 moreSource§impl Debug for StoreHandle
impl Debug for StoreHandle
impl Copy for StoreHandle
Auto Trait Implementations§
impl Freeze for StoreHandle
impl RefUnwindSafe for StoreHandle
impl Send for StoreHandle
impl Sync for StoreHandle
impl Unpin for StoreHandle
impl UnsafeUnpin for StoreHandle
impl UnwindSafe for StoreHandle
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