[−][src]Struct rustc_mir::interpret::Relocations
Relocations.
Implementations
impl<Tag, Id> Relocations<Tag, Id>[src]
pub fn new() -> Relocations<Tag, Id>[src]
pub fn from_presorted(r: Vec<(Size, (Tag, Id))>) -> Relocations<Tag, Id>[src]
Methods from Deref<Target = SortedMap<Size, (Tag, AllocId)>>
pub fn insert(&mut self, key: K, value: V) -> Option<V>[src]
pub fn remove(&mut self, key: &K) -> Option<V>[src]
pub fn get<Q>(&self, key: &Q) -> Option<&V> where
K: Borrow<Q>,
Q: Ord + ?Sized, [src]
K: Borrow<Q>,
Q: Ord + ?Sized,
pub fn get_mut<Q>(&mut self, key: &Q) -> Option<&mut V> where
K: Borrow<Q>,
Q: Ord + ?Sized, [src]
K: Borrow<Q>,
Q: Ord + ?Sized,
pub fn clear(&mut self)[src]
pub fn iter(&self) -> Iter<'_, (K, V)>[src]
Iterate over elements, sorted by key
pub fn keys(
&self
) -> impl DoubleEndedIterator + ExactSizeIterator + Iterator<Item = &K>[src]
&self
) -> impl DoubleEndedIterator + ExactSizeIterator + Iterator<Item = &K>
Iterate over the keys, sorted
pub fn values(
&self
) -> impl DoubleEndedIterator + ExactSizeIterator + Iterator<Item = &V>[src]
&self
) -> impl DoubleEndedIterator + ExactSizeIterator + Iterator<Item = &V>
Iterate over values, sorted by key
pub fn len(&self) -> usize[src]
pub fn is_empty(&self) -> bool[src]
pub fn range<R>(&self, range: R) -> &[(K, V)] where
R: RangeBounds<K>, [src]
R: RangeBounds<K>,
pub fn remove_range<R>(&mut self, range: R) where
R: RangeBounds<K>, [src]
R: RangeBounds<K>,
pub fn offset_keys<F>(&mut self, f: F) where
F: Fn(&mut K), [src]
F: Fn(&mut K),
Mutate all keys with the given function f. This mutation must not
change the sort-order of keys.
pub fn insert_presorted(&mut self, elements: Vec<(K, V)>)[src]
Inserts a presorted range of elements into the map. If the range can be inserted as a whole in between to existing elements of the map, this will be faster than inserting the elements individually.
It is up to the caller to make sure that the elements are sorted by key and that there are no duplicates.
pub fn contains_key<Q>(&self, key: &Q) -> bool where
K: Borrow<Q>,
Q: Ord + ?Sized, [src]
K: Borrow<Q>,
Q: Ord + ?Sized,
Trait Implementations
impl<Tag, Id> Clone for Relocations<Tag, Id> where
Id: Clone,
Tag: Clone, [src]
Id: Clone,
Tag: Clone,
fn clone(&self) -> Relocations<Tag, Id>[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]
impl<Tag, Id> Debug for Relocations<Tag, Id> where
Id: Debug,
Tag: Debug, [src]
Id: Debug,
Tag: Debug,
impl<Tag> Deref for Relocations<Tag, AllocId>[src]
type Target = SortedMap<Size, (Tag, AllocId)>
The resulting type after dereferencing.
fn deref(&self) -> &<Relocations<Tag, AllocId> as Deref>::Target[src]
impl<Tag> DerefMut for Relocations<Tag, AllocId>[src]
impl<Tag, Id> Eq for Relocations<Tag, Id> where
Id: Eq,
Tag: Eq, [src]
Id: Eq,
Tag: Eq,
impl<Tag, Id> Hash for Relocations<Tag, Id> where
Id: Hash,
Tag: Hash, [src]
Id: Hash,
Tag: Hash,
fn hash<__H>(&self, state: &mut __H) where
__H: Hasher, [src]
__H: Hasher,
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
H: Hasher,
impl<Tag, Id> Ord for Relocations<Tag, Id> where
Id: Ord,
Tag: Ord, [src]
Id: Ord,
Tag: Ord,
fn cmp(&self, other: &Relocations<Tag, Id>) -> Ordering[src]
#[must_use]fn max(self, other: Self) -> Self1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self[src]
impl<Tag, Id> PartialEq<Relocations<Tag, Id>> for Relocations<Tag, Id> where
Id: PartialEq<Id>,
Tag: PartialEq<Tag>, [src]
Id: PartialEq<Id>,
Tag: PartialEq<Tag>,
fn eq(&self, other: &Relocations<Tag, Id>) -> bool[src]
fn ne(&self, other: &Relocations<Tag, Id>) -> bool[src]
impl<Tag, Id> PartialOrd<Relocations<Tag, Id>> for Relocations<Tag, Id> where
Id: PartialOrd<Id>,
Tag: PartialOrd<Tag>, [src]
Id: PartialOrd<Id>,
Tag: PartialOrd<Tag>,
fn partial_cmp(&self, other: &Relocations<Tag, Id>) -> Option<Ordering>[src]
fn lt(&self, other: &Relocations<Tag, Id>) -> bool[src]
fn le(&self, other: &Relocations<Tag, Id>) -> bool[src]
fn gt(&self, other: &Relocations<Tag, Id>) -> bool[src]
fn ge(&self, other: &Relocations<Tag, Id>) -> bool[src]
Auto Trait Implementations
impl<Tag, Id> RefUnwindSafe for Relocations<Tag, Id> where
Id: RefUnwindSafe,
Tag: RefUnwindSafe,
Id: RefUnwindSafe,
Tag: RefUnwindSafe,
impl<Tag, Id> Send for Relocations<Tag, Id> where
Id: Send,
Tag: Send,
Id: Send,
Tag: Send,
impl<Tag, Id> Sync for Relocations<Tag, Id> where
Id: Sync,
Tag: Sync,
Id: Sync,
Tag: Sync,
impl<Tag, Id> Unpin for Relocations<Tag, Id> where
Id: Unpin,
Tag: Unpin,
Id: Unpin,
Tag: Unpin,
impl<Tag, Id> UnwindSafe for Relocations<Tag, Id> where
Id: UnwindSafe,
Tag: UnwindSafe,
Id: UnwindSafe,
Tag: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.