Struct garage_model::index_counter::CounterTable
source · pub struct CounterTable<T: CountedItem> { /* private fields */ }
Trait Implementations
sourceimpl<T: CountedItem> TableSchema for CounterTable<T>
impl<T: CountedItem> TableSchema for CounterTable<T>
sourceconst TABLE_NAME: &'static str = T::COUNTER_TABLE_NAME
const TABLE_NAME: &'static str = T::COUNTER_TABLE_NAME
The name of the table in the database
type P = <T as CountedItem>::CP
type P = <T as CountedItem>::CP
The partition key used in that table
type S = <T as CountedItem>::CS
type S = <T as CountedItem>::CS
The sort key used int that table
type E = CounterEntry<T>
type E = CounterEntry<T>
They type for an entry in that table
type Filter = (DeletedFilter, Vec<FixedBytes32, Global>)
type Filter = (DeletedFilter, Vec<FixedBytes32, Global>)
The type for a filter that can be applied to select entries
(e.g. filter out deleted entries) Read more
fn matches_filter(entry: &Self::E, filter: &Self::Filter) -> bool
sourcefn try_migrate(_bytes: &[u8]) -> Option<Self::E>
fn try_migrate(_bytes: &[u8]) -> Option<Self::E>
Try migrating an entry from an older version
sourcefn updated(
&self,
_tx: &mut Transaction<'_>,
_old: Option<&Self::E>,
_new: Option<&Self::E>
) -> Result<(), TxOpError>
fn updated(
&self,
_tx: &mut Transaction<'_>,
_old: Option<&Self::E>,
_new: Option<&Self::E>
) -> Result<(), TxOpError>
Actions triggered by data changing in a table. If such actions
include updates to the local database that should be applied
atomically with the item update itself, a db transaction is
provided on which these changes should be done.
This function can return a DB error but that’s all. Read more
Auto Trait Implementations
impl<T> RefUnwindSafe for CounterTable<T>where
T: RefUnwindSafe,
impl<T> Send for CounterTable<T>
impl<T> Sync for CounterTable<T>
impl<T> Unpin for CounterTable<T>where
T: Unpin,
impl<T> UnwindSafe for CounterTable<T>where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more