Struct wasmtime_environ::entity::BoxedSlice [−][src]
pub struct BoxedSlice<K, V> where
K: EntityRef, { /* fields omitted */ }
Expand description
A slice mapping K -> V
allocating dense entity references.
The BoxedSlice
data structure uses the dense index space to implement a map with a boxed
slice.
Implementations
impl<K, V> BoxedSlice<K, V> where
K: EntityRef,
[src]
impl<K, V> BoxedSlice<K, V> where
K: EntityRef,
[src]pub unsafe fn from_raw(raw: *mut [V]) -> BoxedSlice<K, V>
[src]
pub unsafe fn from_raw(raw: *mut [V]) -> BoxedSlice<K, V>
[src]Create a new slice from a raw pointer. A safer way to create slices is
to use PrimaryMap::into_boxed_slice()
.
Safety
This relies on raw
pointing to a valid slice of V
s.
pub fn get_mut(&mut self, k: K) -> Option<&mut V>
[src]
pub fn get_mut(&mut self, k: K) -> Option<&mut V>
[src]Get the element at k
if it exists, mutable version.
pub fn values_mut(&mut self) -> IterMut<'_, V>
[src]
pub fn values_mut(&mut self) -> IterMut<'_, V>
[src]Iterate over all the values in this map, mutable edition.
Trait Implementations
impl<K, V> Clone for BoxedSlice<K, V> where
K: Clone + EntityRef,
V: Clone,
[src]
impl<K, V> Clone for BoxedSlice<K, V> where
K: Clone + EntityRef,
V: Clone,
[src]pub fn clone(&self) -> BoxedSlice<K, V>
[src]
pub fn clone(&self) -> BoxedSlice<K, V>
[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]Performs copy-assignment from source
. Read more
impl<K, V> Index<K> for BoxedSlice<K, V> where
K: EntityRef,
[src]
impl<K, V> Index<K> for BoxedSlice<K, V> where
K: EntityRef,
[src]Immutable indexing into a BoxedSlice
.
The indexed value must be in the map.
impl<K, V> IndexMut<K> for BoxedSlice<K, V> where
K: EntityRef,
[src]
impl<K, V> IndexMut<K> for BoxedSlice<K, V> where
K: EntityRef,
[src]Mutable indexing into a BoxedSlice
.
impl<'a, K, V> IntoIterator for &'a BoxedSlice<K, V> where
K: EntityRef,
[src]
impl<'a, K, V> IntoIterator for &'a BoxedSlice<K, V> where
K: EntityRef,
[src]impl<'a, K, V> IntoIterator for &'a mut BoxedSlice<K, V> where
K: EntityRef,
[src]
impl<'a, K, V> IntoIterator for &'a mut BoxedSlice<K, V> where
K: EntityRef,
[src]Auto Trait Implementations
impl<K, V> RefUnwindSafe for BoxedSlice<K, V> where
K: RefUnwindSafe,
V: RefUnwindSafe,
K: RefUnwindSafe,
V: RefUnwindSafe,
impl<K, V> Send for BoxedSlice<K, V> where
K: Send,
V: Send,
K: Send,
V: Send,
impl<K, V> Sync for BoxedSlice<K, V> where
K: Sync,
V: Sync,
K: Sync,
V: Sync,
impl<K, V> Unpin for BoxedSlice<K, V> where
K: Unpin,
K: Unpin,
impl<K, V> UnwindSafe for BoxedSlice<K, V> where
K: UnwindSafe,
V: UnwindSafe,
K: UnwindSafe,
V: UnwindSafe,
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more