[][src]Struct no_proto::json_flex::JSMAP

pub struct JSMAP {
    pub values: Vec<(String, NP_JSON)>,
}

The JSON representation of a JS Map

Fields

values: Vec<(String, NP_JSON)>

The vec of values in the map

Implementations

impl JSMAP[src]

pub fn new() -> Self[src]

Generate a new empty map

pub fn insert(&mut self, key: String, value: NP_JSON) -> usize[src]

Insert a value into the map

pub fn get_mut(&mut self, key: &str) -> Option<&mut NP_JSON>[src]

Get a mutable reference to a value in the map

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

Get an immutable reference to a value in the map

pub fn has(&self, key: &str) -> bool[src]

Check if a value exists in the map

Trait Implementations

impl Clone for JSMAP[src]

impl Debug for JSMAP[src]

Auto Trait Implementations

impl Send for JSMAP[src]

impl Sync for JSMAP[src]

impl Unpin for JSMAP[src]

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<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.