Struct BTreeMap

Source
pub struct BTreeMap<A, B> { /* private fields */ }

Implementations§

Source§

impl<K, V> BTreeMap<K, V>

Source

pub fn new() -> Self

Source§

impl<K: Ord, V> BTreeMap<K, V>

Source

pub fn contains_key(&self, key: &K) -> bool

Source

pub fn get(&self, key: &K) -> Option<&V>

Source

pub fn get_mut(&mut self, key: &K) -> Option<&mut V>

Source

pub fn insert(&mut self, key: K, val: V) -> bool

Source

pub fn len(&self) -> usize

Source

pub fn iter(&self) -> impl Iterator<Item = &Pair<K, V>>

Source

pub fn into_iter(self) -> impl Iterator<Item = Pair<K, V>>

Source

pub fn keys(&self) -> impl Iterator<Item = &K>

Source

pub fn values(&self) -> impl Iterator<Item = &V>

Source

pub fn into_keys(self) -> impl Iterator<Item = K>

Source

pub fn into_values(self) -> impl Iterator<Item = V>

Source

pub fn increasing(&self) -> impl Iterator<Item = &Pair<K, V>>

Source

pub fn decreasing(&self) -> impl Iterator<Item = &Pair<K, V>>

Auto Trait Implementations§

§

impl<A, B> Freeze for BTreeMap<A, B>

§

impl<A, B> RefUnwindSafe for BTreeMap<A, B>

§

impl<A, B> Send for BTreeMap<A, B>
where A: Send, B: Send,

§

impl<A, B> Sync for BTreeMap<A, B>
where A: Sync, B: Sync,

§

impl<A, B> Unpin for BTreeMap<A, B>

§

impl<A, B> UnwindSafe for BTreeMap<A, B>
where A: UnwindSafe, B: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.