[][src]Struct bevy_ron::value::Map

pub struct Map(_);

A Value to Value map.

This structure either uses a BTreeMap or the IndexMap internally. The latter can be used by enabling the indexmap feature. This can be used to preserve the order of the parsed map.

Implementations

impl Map[src]

pub fn new() -> Map[src]

Creates a new, empty Map.

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

Returns the number of elements in the map.

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

Returns true if self.len() == 0, false otherwise.

pub fn insert(&mut self, key: Value, value: Value) -> Option<Value>[src]

Inserts a new element, returning the previous element with this key if there was any.

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

Removes an element by its key.

pub fn iter(
    &self
) -> impl Iterator<Item = (&Value, &Value)> + DoubleEndedIterator
[src]

Iterate all key-value pairs.

pub fn iter_mut(
    &mut self
) -> impl Iterator<Item = (&Value, &mut Value)> + DoubleEndedIterator
[src]

Iterate all key-value pairs mutably.

pub fn keys(&self) -> impl Iterator<Item = &Value> + DoubleEndedIterator[src]

Iterate all keys.

pub fn values(&self) -> impl Iterator<Item = &Value> + DoubleEndedIterator[src]

Iterate all values.

pub fn values_mut(
    &mut self
) -> impl Iterator<Item = &mut Value> + DoubleEndedIterator
[src]

Iterate all values mutably.

Trait Implementations

impl Clone for Map[src]

impl Debug for Map[src]

impl Default for Map[src]

impl<'de> Deserialize<'de> for Map[src]

impl Eq for Map[src]

Note: equality is only given if both values and order of values match

impl FromIterator<(Value, Value)> for Map[src]

impl Hash for Map[src]

impl<'_> Index<&'_ Value> for Map[src]

type Output = Value

The returned type after indexing.

impl<'_> IndexMut<&'_ Value> for Map[src]

impl Ord for Map[src]

impl PartialEq<Map> for Map[src]

Note: equality is only given if both values and order of values match

impl PartialOrd<Map> for Map[src]

impl Serialize for Map[src]

Auto Trait Implementations

impl RefUnwindSafe for Map

impl Send for Map

impl Sync for Map

impl Unpin for Map

impl UnwindSafe for Map

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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

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

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

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.