pub struct ConcurrentStateRegistry<K, N> { /* private fields */ }Implementations§
Source§impl<K, N, D, S, C> ConcurrentStateRegistry<K, N>
impl<K, N, D, S, C> ConcurrentStateRegistry<K, N>
pub fn with_capacity_and_shard_amount( capacity: usize, shard_amount: usize, ) -> ConcurrentStateRegistry<K, N>
Sourcepub fn insert_if_not_dominated(
&self,
dp: &D,
node: N,
) -> ConcurrentInsertionResult<N>
pub fn insert_if_not_dominated( &self, dp: &D, node: N, ) -> ConcurrentInsertionResult<N>
Inserts a node into the registry if it is not dominated by any other node.
Sourcepub fn insert_with_if_not_dominated(
&self,
dp: &mut D,
state: S,
cost: C,
constructor: impl FnOnce(&mut D, S, C, Option<&N>) -> Option<N>,
) -> ConcurrentInsertionResult<N>
pub fn insert_with_if_not_dominated( &self, dp: &mut D, state: S, cost: C, constructor: impl FnOnce(&mut D, S, C, Option<&N>) -> Option<N>, ) -> ConcurrentInsertionResult<N>
Inserts a node created from a state and a cost by a constructor into the registry if it is not dominated by any other node.
The constructor may use the information of a node that has the same state as the new node.
If the constructor returns None, the node is not inserted.
pub fn clear(&mut self)
Trait Implementations§
Auto Trait Implementations§
impl<K, N> !RefUnwindSafe for ConcurrentStateRegistry<K, N>
impl<K, N> Freeze for ConcurrentStateRegistry<K, N>
impl<K, N> Send for ConcurrentStateRegistry<K, N>
impl<K, N> Sync for ConcurrentStateRegistry<K, N>
impl<K, N> Unpin for ConcurrentStateRegistry<K, N>
impl<K, N> UnsafeUnpin for ConcurrentStateRegistry<K, N>
impl<K, N> UnwindSafe for ConcurrentStateRegistry<K, N>
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> 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 more