[][src]Struct opentelemetry::sdk::trace::EvictedHashMap

pub struct EvictedHashMap { /* fields omitted */ }

A hash map with a capped number of attributes that retains the most recently set entries.

Implementations

impl EvictedHashMap[src]

pub fn new(capacity: u32) -> Self[src]

Create a new EvictedHashMap with a given capacity.

pub fn insert(&mut self, item: KeyValue)[src]

Inserts a key-value pair into the map.

pub fn len(&self) -> usize[src]

Returns the number of elements in the map.

pub fn is_empty(&self) -> bool[src]

Returns true if the map is empty.

pub fn dropped_count(&self) -> u32[src]

Returns the dropped attribute count

pub fn iter(&self) -> Iter<'_, Key, Value>[src]

Returns a front-to-back iterator.

pub fn get(&self, key: &Key) -> Option<&Value>[src]

Returns a reference to the value corresponding to the key if it exists

Trait Implementations

impl Clone for EvictedHashMap[src]

impl Debug for EvictedHashMap[src]

impl IntoIterator for EvictedHashMap[src]

type Item = (Key, Value)

The type of the elements being iterated over.

type IntoIter = IntoIter<Key, Value>

Which kind of iterator are we turning this into?

fn into_iter(self) -> Self::IntoIter[src]

Creates a consuming iterator, that is, one that moves each key-value pair out of the map in arbitrary order. The map cannot be used after calling this.

impl<'a> IntoIterator for &'a EvictedHashMap[src]

type Item = (&'a Key, &'a Value)

The type of the elements being iterated over.

type IntoIter = Iter<'a, Key, Value>

Which kind of iterator are we turning this into?

impl<'a> IntoIterator for &'a mut EvictedHashMap[src]

type Item = (&'a Key, &'a mut Value)

The type of the elements being iterated over.

type IntoIter = IterMut<'a, Key, Value>

Which kind of iterator are we turning this into?

impl PartialEq<EvictedHashMap> for EvictedHashMap[src]

impl StructuralPartialEq for EvictedHashMap[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,