[][src]Struct mtots_core::NativeModuleBuilder

pub struct NativeModuleBuilder { /* fields omitted */ }

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]

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]

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]

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]

pub fn class<T, F>(&mut self, name: &str, f: F) -> &mut Self where
    T: Any,
    F: FnOnce(&mut NativeClassBuilder<'_, T>), 
[src]

pub fn action<F>(&mut self, body: F) where
    F: FnOnce(&mut Globals, &HashMap<RcStr, Rc<RefCell<Value>>>) -> Result<()> + 'static, 
[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, 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.