Struct garage_model::index_counter::IndexCounter
source · pub struct IndexCounter<T: CountedItem> {
pub table: Arc<Table<CounterTable<T>, TableShardedReplication>>,
/* private fields */
}
Fields§
§table: Arc<Table<CounterTable<T>, TableShardedReplication>>
Implementations§
source§impl<T: CountedItem> IndexCounter<T>
impl<T: CountedItem> IndexCounter<T>
pub fn new( system: Arc<System>, replication: TableShardedReplication, db: &Db ) -> Arc<Self>
pub fn spawn_workers(&self, bg: &BackgroundRunner)
pub fn count( &self, tx: &mut Transaction<'_>, old: Option<&T>, new: Option<&T> ) -> TxResult<(), Error>
pub fn offline_recount_all<TS, TR>(
&self,
counted_table: &Arc<Table<TS, TR>>
) -> Result<(), Error>where
TS: TableSchema<E = T>,
TR: TableReplication,
Auto Trait Implementations§
impl<T> Freeze for IndexCounter<T>
impl<T> !RefUnwindSafe for IndexCounter<T>
impl<T> Send for IndexCounter<T>
impl<T> Sync for IndexCounter<T>
impl<T> Unpin for IndexCounter<T>
impl<T> !UnwindSafe for IndexCounter<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