Struct snarkvm_compiler::map::memory_map::MemoryMap
source · [−]pub struct MemoryMap<K: Copy + Clone + PartialEq + Eq + Hash + Serialize + for<'de> Deserialize<'de> + Send + Sync, V: Clone + PartialEq + Eq + Serialize + for<'de> Deserialize<'de> + Send + Sync> { /* private fields */ }
Trait Implementations
sourceimpl<K: Clone + Copy + Clone + PartialEq + Eq + Hash + Serialize + for<'de> Deserialize<'de> + Send + Sync, V: Clone + Clone + PartialEq + Eq + Serialize + for<'de> Deserialize<'de> + Send + Sync> Clone for MemoryMap<K, V>
impl<K: Clone + Copy + Clone + PartialEq + Eq + Hash + Serialize + for<'de> Deserialize<'de> + Send + Sync, V: Clone + Clone + PartialEq + Eq + Serialize + for<'de> Deserialize<'de> + Send + Sync> Clone for MemoryMap<K, V>
sourceimpl<K: Copy + Clone + PartialEq + Eq + Hash + Serialize + for<'de> Deserialize<'de> + Send + Sync, V: Clone + PartialEq + Eq + Serialize + for<'de> Deserialize<'de> + Send + Sync> Default for MemoryMap<K, V>
impl<K: Copy + Clone + PartialEq + Eq + Hash + Serialize + for<'de> Deserialize<'de> + Send + Sync, V: Clone + PartialEq + Eq + Serialize + for<'de> Deserialize<'de> + Send + Sync> Default for MemoryMap<K, V>
sourceimpl<K: Copy + Clone + PartialEq + Eq + Hash + Serialize + for<'de> Deserialize<'de> + Send + Sync, V: Clone + PartialEq + Eq + Serialize + for<'de> Deserialize<'de> + Send + Sync> Deref for MemoryMap<K, V>
impl<K: Copy + Clone + PartialEq + Eq + Hash + Serialize + for<'de> Deserialize<'de> + Send + Sync, V: Clone + PartialEq + Eq + Serialize + for<'de> Deserialize<'de> + Send + Sync> Deref for MemoryMap<K, V>
sourceimpl<K: Copy + Clone + PartialEq + Eq + Hash + Serialize + for<'de> Deserialize<'de> + Send + Sync, V: Clone + PartialEq + Eq + Serialize + for<'de> Deserialize<'de> + Send + Sync> FromIterator<(K, V)> for MemoryMap<K, V>
impl<K: Copy + Clone + PartialEq + Eq + Hash + Serialize + for<'de> Deserialize<'de> + Send + Sync, V: Clone + PartialEq + Eq + Serialize + for<'de> Deserialize<'de> + Send + Sync> FromIterator<(K, V)> for MemoryMap<K, V>
sourcefn from_iter<I: IntoIterator<Item = (K, V)>>(iter: I) -> Self
fn from_iter<I: IntoIterator<Item = (K, V)>>(iter: I) -> Self
Initializes a new MemoryMap
from the given iterator.
sourceimpl<'a, K: 'a + Copy + Clone + PartialEq + Eq + Hash + Serialize + for<'de> Deserialize<'de> + Send + Sync, V: 'a + Clone + PartialEq + Eq + Serialize + for<'de> Deserialize<'de> + Send + Sync> Map<'a, K, V> for MemoryMap<K, V>
impl<'a, K: 'a + Copy + Clone + PartialEq + Eq + Hash + Serialize + for<'de> Deserialize<'de> + Send + Sync, V: 'a + Clone + PartialEq + Eq + Serialize + for<'de> Deserialize<'de> + Send + Sync> Map<'a, K, V> for MemoryMap<K, V>
sourcefn insert(&self, key: K, value: V) -> Result<()>
fn insert(&self, key: K, value: V) -> Result<()>
Inserts the given key-value pair into the map.
sourcefn remove(&self, key: &K) -> Result<()>
fn remove(&self, key: &K) -> Result<()>
Removes the key-value pair for the given key from the map.
sourcefn start_atomic(&self)
fn start_atomic(&self)
Begins an atomic operation. Any further calls to insert
and remove
will be queued
without an actual write taking place until finish_atomic
is called.
sourcefn is_atomic_in_progress(&self) -> bool
fn is_atomic_in_progress(&self) -> bool
Checks whether an atomic operation is currently in progress. This can be done to ensure that lower-level operations don’t start and finish their individual atomic write batch if they are already part of a larger one.
sourcefn abort_atomic(&self)
fn abort_atomic(&self)
Aborts the current atomic operation.
sourcefn finish_atomic(&self) -> Result<()>
fn finish_atomic(&self) -> Result<()>
Finishes an atomic operation, performing all the queued writes.
sourceimpl<'a, K: 'a + Copy + Clone + PartialEq + Eq + Hash + Serialize + for<'de> Deserialize<'de> + Send + Sync, V: 'a + Clone + PartialEq + Eq + Serialize + for<'de> Deserialize<'de> + Send + Sync> MapRead<'a, K, V> for MemoryMap<K, V>
impl<'a, K: 'a + Copy + Clone + PartialEq + Eq + Hash + Serialize + for<'de> Deserialize<'de> + Send + Sync, V: 'a + Clone + PartialEq + Eq + Serialize + for<'de> Deserialize<'de> + Send + Sync> MapRead<'a, K, V> for MemoryMap<K, V>
sourcefn contains_key<Q>(&self, key: &Q) -> Result<bool> where
K: Borrow<Q>,
Q: PartialEq + Eq + Hash + Serialize + ?Sized,
fn contains_key<Q>(&self, key: &Q) -> Result<bool> where
K: Borrow<Q>,
Q: PartialEq + Eq + Hash + Serialize + ?Sized,
Returns true
if the given key exists in the map.
sourcefn get<Q>(&'a self, key: &Q) -> Result<Option<Cow<'a, V>>> where
K: Borrow<Q>,
Q: PartialEq + Eq + Hash + Serialize + ?Sized,
fn get<Q>(&'a self, key: &Q) -> Result<Option<Cow<'a, V>>> where
K: Borrow<Q>,
Q: PartialEq + Eq + Hash + Serialize + ?Sized,
Returns the value for the given key from the map, if it exists.
sourcefn iter(&'a self) -> Self::Iterator
fn iter(&'a self) -> Self::Iterator
Returns an iterator visiting each key-value pair in the map.
type Iterator = Map<IntoIter<K, V>, fn((K, V)) -> (Cow<'a, K>, Cow<'a, V>)>
type Keys = Map<IntoKeys<K, V>, fn(K) -> Cow<'a, K>>
type Values = Map<IntoValues<K, V>, fn(V) -> Cow<'a, V>>
Auto Trait Implementations
impl<K, V> !RefUnwindSafe for MemoryMap<K, V>
impl<K, V> Send for MemoryMap<K, V>
impl<K, V> Sync for MemoryMap<K, V>
impl<K, V> Unpin for MemoryMap<K, V>
impl<K, V> !UnwindSafe for MemoryMap<K, V>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> Pointable for T
impl<T> Pointable for T
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more