GradientStore

Struct GradientStore 

Source
pub struct GradientStore<K = NodeIndex, V = Box<dyn Any>> { /* private fields */ }

Implementations§

Source§

impl<K, V> GradientStore<K, V>
where K: Ord,

Source

pub fn new() -> Self

Source

pub fn entry(&mut self, key: K) -> Entry<'_, K, V>

Source

pub fn or_insert(&mut self, key: K, value: V) -> &mut V

Trait Implementations§

Source§

impl<K, V> Default for GradientStore<K, V>
where K: Ord,

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<K, T> Index<K> for GradientStore<K, T>
where K: Ord,

Source§

type Output = T

The returned type after indexing.
Source§

fn index(&self, key: K) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl<K, T> IndexMut<K> for GradientStore<K, T>
where K: Ord,

Source§

fn index_mut(&mut self, key: K) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl<K, T> Store<K, T> for GradientStore<K, T>
where K: Ord,

Source§

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

Source§

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

Source§

fn insert(&mut self, key: K, value: T) -> Option<T>

Source§

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

Auto Trait Implementations§

§

impl<K, V> Freeze for GradientStore<K, V>

§

impl<K, V> RefUnwindSafe for GradientStore<K, V>

§

impl<K, V> Send for GradientStore<K, V>
where K: Send, V: Send,

§

impl<K, V> Sync for GradientStore<K, V>
where K: Sync, V: Sync,

§

impl<K, V> Unpin for GradientStore<K, V>

§

impl<K, V> UnwindSafe for GradientStore<K, V>

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<K, Q> Id<K> for Q
where K: Identifier, Q: Borrow<K>,

Source§

type Q = Q

Source§

fn from_id(id: <Q as Id<K>>::Q) -> Q

Source§

fn get(&self) -> &<Q as Id<K>>::Q

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<S, F> IntoOp<F> for S
where F: Operator, S: Into<F>,

Source§

fn into_op(self) -> F

Source§

impl<S, T> StoreExt<T> for S
where S: Store<<T as Identify>::Id, T>, T: Identify, <T as Identify>::Id: Copy,

Source§

type Store = S

Source§

fn store(&self) -> &<S as StoreExt<T>>::Store

Source§

fn store_mut(&mut self) -> &mut <S as StoreExt<T>>::Store

Source§

fn get(&self, item: T) -> Option<&T>

Source§

fn get_mut(&mut self, item: T) -> Option<&mut T>

Source§

fn insert(&mut self, item: T) -> Option<T>

Source§

fn remove(&mut self, item: T) -> Option<T>

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.