Struct garage_model::index_counter::CounterEntry
source · pub struct CounterEntry<T: CountedItem> {
pub pk: T::CP,
pub sk: T::CS,
pub values: BTreeMap<String, CounterValue>,
}
Expand description
A counter entry in the global table
Fields§
§pk: T::CP
§sk: T::CS
§values: BTreeMap<String, CounterValue>
Implementations§
source§impl<T: CountedItem> CounterEntry<T>
impl<T: CountedItem> CounterEntry<T>
pub fn filtered_values(&self, layout: &LayoutHelper) -> HashMap<String, i64>
pub fn filtered_values_with_nodes(&self, nodes: &[Uuid]) -> HashMap<String, i64>
Trait Implementations§
source§impl<T: Clone + CountedItem> Clone for CounterEntry<T>
impl<T: Clone + CountedItem> Clone for CounterEntry<T>
source§fn clone(&self) -> CounterEntry<T>
fn clone(&self) -> CounterEntry<T>
Returns a copy 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<T: CountedItem> Crdt for CounterEntry<T>
impl<T: CountedItem> Crdt for CounterEntry<T>
source§impl<T: Debug + CountedItem> Debug for CounterEntry<T>
impl<T: Debug + CountedItem> Debug for CounterEntry<T>
source§impl<'de, T: CountedItem> Deserialize<'de> for CounterEntry<T>
impl<'de, T: CountedItem> Deserialize<'de> for CounterEntry<T>
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<T: CountedItem> Entry<<T as CountedItem>::CP, <T as CountedItem>::CS> for CounterEntry<T>
impl<T: CountedItem> Entry<<T as CountedItem>::CP, <T as CountedItem>::CS> for CounterEntry<T>
source§impl<T: CountedItem> InitialFormat for CounterEntry<T>
impl<T: CountedItem> InitialFormat for CounterEntry<T>
source§const VERSION_MARKER: &'static [u8] = b""
const VERSION_MARKER: &'static [u8] = b""
A sequence of bytes to add at the beginning of the serialized
string, to identify that the data is of this version.
source§impl<T: PartialEq + CountedItem> PartialEq for CounterEntry<T>
impl<T: PartialEq + CountedItem> PartialEq for CounterEntry<T>
source§fn eq(&self, other: &CounterEntry<T>) -> bool
fn eq(&self, other: &CounterEntry<T>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<T: CountedItem> Serialize for CounterEntry<T>
impl<T: CountedItem> Serialize for CounterEntry<T>
impl<T: CountedItem> StructuralPartialEq for CounterEntry<T>
Auto Trait Implementations§
impl<T> Freeze for CounterEntry<T>
impl<T> RefUnwindSafe for CounterEntry<T>
impl<T> Send for CounterEntry<T>
impl<T> Sync for CounterEntry<T>
impl<T> Unpin for CounterEntry<T>
impl<T> UnwindSafe for CounterEntry<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
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> Migrate for Twhere
T: InitialFormat,
impl<T> Migrate for Twhere
T: InitialFormat,
source§const VERSION_MARKER: &'static [u8] = <T as InitialFormat>::VERSION_MARKER
const VERSION_MARKER: &'static [u8] = <T as InitialFormat>::VERSION_MARKER
A sequence of bytes to add at the beginning of the serialized
string, to identify that the data is of this version.
§type Previous = NoPrevious
type Previous = NoPrevious
The previous version of this data type, from which items of this version
can be migrated.
source§fn migrate(_previous: <T as Migrate>::Previous) -> T
fn migrate(_previous: <T as Migrate>::Previous) -> T
The migration function that transforms a value decoded in the old format
to an up-to-date value.