[−][src]Struct artemis::ExtensionMap
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.
Methods
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
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,