Skip to main content

ImmutableGroup

Struct ImmutableGroup 

Source
pub struct ImmutableGroup<T, K, G> { /* private fields */ }
Expand description

The state of a group at one moment (ImmutableGroup<TObject, TKey, TGroupKey>, the IGrouping of the change sets of GroupWithImmutableState): a copy of its items that does not change. A clone is the same state.

Deviation (DEVIATIONS.md, DynamicData): upstream’s class is internal and its change sets hold the interface IGrouping; here they hold this type, so it is public.

Implementations§

Source§

impl<T: Clone, K: Eq + Hash + Clone, G> ImmutableGroup<T, K, G>

Source

pub fn ptr_eq(&self, other: &Self) -> bool

Whether self and other are the same state (ReferenceEquals).

Trait Implementations§

Source§

impl<T, K, G> Clone for ImmutableGroup<T, K, G>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T: Clone, K: Eq + Hash + Clone, G: Debug> Debug for ImmutableGroup<T, K, G>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<T: Clone, K: Eq + Hash + Clone, G: Display> Display for ImmutableGroup<T, K, G>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

ToString: Grouping for: {Key} ({Count} items).

Source§

impl<T, K, G: Eq> Eq for ImmutableGroup<T, K, G>

Source§

impl<T, K, G: Hash> Hash for ImmutableGroup<T, K, G>

Source§

fn hash<H: Hasher>(&self, state: &mut H)

The hash of the group key (GetHashCode).

1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<T: 'static, K: 'static, G: 'static> IChangeSet<ImmutableGroup<T, K, G>, G> for ImmutableGroupChangeSet<T, K, G>

Source§

fn change_set(&self) -> &ChangeSet<ImmutableGroup<T, K, G>, G>

The changes.
Source§

impl<T: Clone, K: Eq + Hash + Clone, G> IGrouping<T, K, G> for ImmutableGroup<T, K, G>

Source§

fn count(&self) -> usize

The number of items (Count).
Source§

fn items(&self) -> Vec<T>

The items (Items).
Source§

fn key(&self) -> &G

The group key (Key).
Source§

fn keys(&self) -> Vec<K>

The keys of the items (Keys).
Source§

fn key_values(&self) -> Vec<(K, T)>

The keys with their items (KeyValues).
Source§

fn lookup(&self, key: &K) -> Option<T>

The item of key (Lookup).
Source§

impl<T, K, G: PartialEq> PartialEq for ImmutableGroup<T, K, G>

Source§

fn eq(&self, other: &Self) -> bool

States of the same group key are equal (Equals).

1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more

Auto Trait Implementations§

§

impl<T, K, G> !Send for ImmutableGroup<T, K, G>

§

impl<T, K, G> !Sync for ImmutableGroup<T, K, G>

§

impl<T, K, G> Freeze for ImmutableGroup<T, K, G>
where Rc<Inner<T, K, G>>: Freeze,

§

impl<T, K, G> RefUnwindSafe for ImmutableGroup<T, K, G>
where Rc<Inner<T, K, G>>: RefUnwindSafe,

§

impl<T, K, G> Unpin for ImmutableGroup<T, K, G>
where Rc<Inner<T, K, G>>: Unpin,

§

impl<T, K, G> UnsafeUnpin for ImmutableGroup<T, K, G>
where Rc<Inner<T, K, G>>: UnsafeUnpin,

§

impl<T, K, G> UnwindSafe for ImmutableGroup<T, K, G>
where Rc<Inner<T, K, G>>: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.