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 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<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§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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§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.
Source§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.