Enum Compute

Source
pub enum Compute<'g, K, V, T> {
    Inserted(&'g K, &'g V),
    Updated {
        old: (&'g K, &'g V),
        new: (&'g K, &'g V),
    },
    Removed(&'g K, &'g V),
    Aborted(T),
}
Expand description

The result of a compute operation.

Contains information about the Operation that was performed.

Variants§

§

Inserted(&'g K, &'g V)

The given entry was inserted.

§

Updated

The entry was updated.

Fields

§old: (&'g K, &'g V)

The entry that was replaced.

§new: (&'g K, &'g V)

The entry that was inserted.

§

Removed(&'g K, &'g V)

The given entry was removed.

§

Aborted(T)

The operation was aborted with the given value.

Trait Implementations§

Source§

impl<'g, K: Debug, V: Debug, T: Debug> Debug for Compute<'g, K, V, T>

Source§

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

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

impl<'g, K: PartialEq, V: PartialEq, T: PartialEq> PartialEq for Compute<'g, K, V, T>

Source§

fn eq(&self, other: &Compute<'g, K, V, T>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<'g, K: Eq, V: Eq, T: Eq> Eq for Compute<'g, K, V, T>

Source§

impl<'g, K, V, T> StructuralPartialEq for Compute<'g, K, V, T>

Auto Trait Implementations§

§

impl<'g, K, V, T> Freeze for Compute<'g, K, V, T>
where T: Freeze,

§

impl<'g, K, V, T> RefUnwindSafe for Compute<'g, K, V, T>

§

impl<'g, K, V, T> Send for Compute<'g, K, V, T>
where T: Send, K: Sync, V: Sync,

§

impl<'g, K, V, T> Sync for Compute<'g, K, V, T>
where T: Sync, K: Sync, V: Sync,

§

impl<'g, K, V, T> Unpin for Compute<'g, K, V, T>
where T: Unpin,

§

impl<'g, K, V, T> UnwindSafe for Compute<'g, K, V, T>

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<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.