Struct MemoryCache
pub struct MemoryCache { /* private fields */ }
Expand description
A solver cache backed by a HashMap
.
Implementations§
§impl MemoryCache
impl MemoryCache
pub fn new() -> Self
pub fn new() -> Self
Creates a new, empty, MemoryCache
.
Trait Implementations§
§impl Default for MemoryCache
impl Default for MemoryCache
§fn default() -> MemoryCache
fn default() -> MemoryCache
Returns the “default value” for a type. Read more
§impl SolverCache for MemoryCache
impl SolverCache for MemoryCache
§fn get(&mut self, hash: &AssertionHash) -> Option<CacheResult>
fn get(&mut self, hash: &AssertionHash) -> Option<CacheResult>
Reads an entry from the solver cache.
§fn insert(&mut self, hash: AssertionHash, result: CacheResult)
fn insert(&mut self, hash: AssertionHash, result: CacheResult)
Inserts a new entry into the solver cache.
Auto Trait Implementations§
impl Freeze for MemoryCache
impl RefUnwindSafe for MemoryCache
impl Send for MemoryCache
impl Sync for MemoryCache
impl Unpin for MemoryCache
impl UnwindSafe for MemoryCache
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
§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
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