[][src]Struct mtots::NativeModuleBuilder

pub struct NativeModuleBuilder { /* fields omitted */ }

Implementations

impl NativeModuleBuilder[src]

pub fn doc<D>(&mut self, doc: D) -> &mut NativeModuleBuilder where
    D: Into<RcStr>, 
[src]

pub fn dep<N>(
    &mut self,
    name: N,
    alias: Option<&str>,
    reexports: &[(&str, &str)]
) -> &mut NativeModuleBuilder where
    N: Into<RcStr>, 
[src]

pub fn field<N, D, F>(
    &mut self,
    name: N,
    doc: D,
    body: F
) -> &mut NativeModuleBuilder where
    D: Into<DocStr>,
    F: FnOnce(&mut Globals, &HashMap<RcStr, Rc<RefCell<Value>>, RandomState>) -> Result<Value, Error> + 'static,
    N: Into<RcStr>, 
[src]

pub fn val<N, D, V>(
    &mut self,
    name: N,
    doc: D,
    value: V
) -> &mut NativeModuleBuilder where
    D: Into<DocStr>,
    N: Into<RcStr>,
    V: Into<Value>, 
[src]

pub fn func<N, A, D, B>(
    &mut self,
    name: N,
    argspec: A,
    doc: D,
    body: B
) -> &mut NativeModuleBuilder where
    A: Into<ArgSpec>,
    B: Fn(&mut Globals, Vec<Value>, Option<HashMap<RcStr, Value, RandomState>>) -> Result<Value, Error> + 'static,
    D: Into<DocStr>,
    N: Into<RcStr>, 
[src]

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

pub fn action<F>(&mut self, body: F) where
    F: FnOnce(&mut Globals, &HashMap<RcStr, Rc<RefCell<Value>>, RandomState>) -> Result<(), Error> + '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> Same<T> for T

type Output = T

Should always be Self

impl<T> SetParameter for T

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 

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