Struct artemis::ExtensionMap[][src]

pub struct ExtensionMap { /* fields omitted */ }

A map of keyed extensions. The key is only used for JS interop, the Rust version uses the type as the key.

This is usually instantiated by the ext![] macro.

Implementations

impl ExtensionMap[src]

pub fn new() -> Self[src]

Create a new extension map. This is usually just called by the ext![] macro.

pub fn insert<T: Extension>(&mut self, value: T)[src]

Insert a value into the map. This is usually called by the ext![] macro.

pub fn get<T: Extension, S: Into<String>>(&self, js_key: S) -> Option<T>[src]

Get a value from the map. The key is only used to get the value out of the JavaScript object, if the extension was inserted on the Rust side it doesn’t do anything.

Trait Implementations

impl Default for ExtensionMap[src]

impl Send for ExtensionMap[src]

impl Sync for ExtensionMap[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> Instrument for T[src]

impl<T> Instrument for T[src]

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

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