Skip to main content

Group

Struct Group 

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

A group of the items of a cache that share a group key (ManagedGroup<TObject, TKey, TGroupKey>, the IGroup of the change sets of Group): the grouping operators edit its cache, and its observers watch it. A clone is the same group.

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

Implementations§

Source§

impl<T: Clone + 'static, K: Eq + Hash + Clone + 'static, G> Group<T, K, G>

Source

pub fn key(&self) -> &G

The group key (Key).

Source

pub fn cache(&self) -> Rc<dyn IObservableCache<T, K>>

The items of the group (Cache).

Source

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

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

Trait Implementations§

Source§

impl<T, K, G> Clone for Group<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, K, G: Debug> Debug for Group<T, K, G>

Source§

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

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

impl<T, K, G: Display> Display for Group<T, K, G>

Source§

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

ToString: Group: {Key}.

Source§

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

Source§

impl<T, K, G: Hash> Hash for Group<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<Group<T, K, G>, G> for GroupChangeSet<T, K, G>

Source§

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

The changes.
Source§

impl<T: Clone + 'static, K: Eq + Hash + Clone + 'static, G> IDisposable for Group<T, K, G>

Source§

fn dispose(&self)

Ends the cache of the group, which completes its observers (Dispose).

Source§

impl<T: Clone + 'static, K: Eq + Hash + Clone + 'static, G> IGroup<T, K, G> for Group<T, K, G>

Source§

fn key(&self) -> &G

The group key (Key, of IKey<TGroupKey>).
Source§

fn cache(&self) -> Rc<dyn IObservableCache<T, K>>

The items of the group, as a cache that can be observed (Cache).
Source§

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

Source§

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

Groups of the same 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> !RefUnwindSafe for Group<T, K, G>

§

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

§

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

§

impl<T, K, G> !UnwindSafe for Group<T, K, G>

§

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

§

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

§

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

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.