[−][src]Struct mtots_core::NativeModuleBuilder
Implementations
impl NativeModuleBuilder
[src]
pub fn doc<D: Into<RcStr>>(&mut self, doc: D) -> &mut Self
[src]
pub fn dep<N: Into<RcStr>>(
&mut self,
name: N,
alias: Option<&str>,
reexports: &[(&str, &str)]
) -> &mut Self
[src]
&mut self,
name: N,
alias: Option<&str>,
reexports: &[(&str, &str)]
) -> &mut Self
pub fn field<N, D, F>(&mut self, name: N, doc: D, body: F) -> &mut Self where
N: Into<RcStr>,
D: Into<DocStr>,
F: FnOnce(&mut Globals, &HashMap<RcStr, Rc<RefCell<Value>>>) -> Result<Value> + 'static,
[src]
N: Into<RcStr>,
D: Into<DocStr>,
F: FnOnce(&mut Globals, &HashMap<RcStr, Rc<RefCell<Value>>>) -> Result<Value> + 'static,
pub fn val<N, D, V>(&mut self, name: N, doc: D, value: V) -> &mut Self where
N: Into<RcStr>,
D: Into<DocStr>,
V: Into<Value>,
[src]
N: Into<RcStr>,
D: Into<DocStr>,
V: Into<Value>,
pub fn func<N, A, D, B>(
&mut self,
name: N,
argspec: A,
doc: D,
body: B
) -> &mut Self where
N: Into<RcStr>,
A: Into<ArgSpec>,
D: Into<DocStr>,
B: Fn(&mut Globals, Vec<Value>, Option<HashMap<RcStr, Value>>) -> Result<Value> + 'static,
[src]
&mut self,
name: N,
argspec: A,
doc: D,
body: B
) -> &mut Self where
N: Into<RcStr>,
A: Into<ArgSpec>,
D: Into<DocStr>,
B: Fn(&mut Globals, Vec<Value>, Option<HashMap<RcStr, Value>>) -> Result<Value> + 'static,
pub fn class<T, F>(&mut self, name: &str, f: F) -> &mut Self where
T: Any,
F: FnOnce(&mut NativeClassBuilder<'_, T>),
[src]
T: Any,
F: FnOnce(&mut NativeClassBuilder<'_, T>),
pub fn action<F>(&mut self, body: F) where
F: FnOnce(&mut Globals, &HashMap<RcStr, Rc<RefCell<Value>>>) -> Result<()> + 'static,
[src]
F: FnOnce(&mut Globals, &HashMap<RcStr, Rc<RefCell<Value>>>) -> Result<()> + 'static,
Auto Trait Implementations
impl !RefUnwindSafe for NativeModuleBuilder
impl !Send for NativeModuleBuilder
impl !Sync for NativeModuleBuilder
impl Unpin for NativeModuleBuilder
impl !UnwindSafe for NativeModuleBuilder
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>,