[][src]Struct arithmetic_eval::ExecutableModuleBuilder

pub struct ExecutableModuleBuilder<'a, T> { /* fields omitted */ }

Builder for an ExecutableModule.

The builder can be created via ExecutableModule::builder(). See ExecutableModule docs for the examples of usage.

Implementations

impl<'a, T> ExecutableModuleBuilder<'a, T>[src]

pub fn has_undefined_imports(&self) -> bool[src]

Checks if all necessary imports are defined for this module.

pub fn undefined_imports(&self) -> impl Iterator<Item = &str> + '_[src]

Iterates over the names of undefined imports.

pub fn with_import(self, name: &str, value: Value<'a, T>) -> Self[src]

Adds a single import. If the specified variable is not an import, does nothing.

pub fn with_imports_from<V: ?Sized>(self, source: &V) -> Self where
    V: VariableMap<'a, T>, 
[src]

Sets undefined imports from the specified source. Imports defined previously and present in the source are not overridden.

pub fn try_build(self) -> Result<ExecutableModule<'a, T>, Error<'a>>[src]

Tries to build this module.

Errors

Fails if this module has at least one undefined import. In this case, the returned error highlights one of such imports.

pub fn build(self) -> ExecutableModule<'a, T>[src]

A version of Self::try_build() that panics if there are undefined imports.

pub fn set_imports<F>(self, setter: F) -> ExecutableModule<'a, T> where
    F: FnMut(&str) -> Value<'a, T>, 
[src]

Sets the undefined imports using the provided closure and returns the resulting module. The closure is called with the name of each undefined import and should return the corresponding Value.

Trait Implementations

impl<'a, T: Debug> Debug for ExecutableModuleBuilder<'a, T>[src]

Auto Trait Implementations

impl<'a, T> !RefUnwindSafe for ExecutableModuleBuilder<'a, T>

impl<'a, T> !Send for ExecutableModuleBuilder<'a, T>

impl<'a, T> !Sync for ExecutableModuleBuilder<'a, T>

impl<'a, T> Unpin for ExecutableModuleBuilder<'a, T> where
    T: Unpin

impl<'a, T> !UnwindSafe for ExecutableModuleBuilder<'a, T>

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> Conv for T

impl<T> Conv for T

impl<T> FmtForward for T

impl<T> From<T> for T[src]

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

impl<T> Pipe for T where
    T: ?Sized

impl<T> Pipe for T

impl<T> PipeAsRef for T

impl<T> PipeBorrow for T

impl<T> PipeDeref for T

impl<T> PipeRef for T

impl<T> Tap for T

impl<T> Tap for T

impl<T, U> TapAsRef<U> for T where
    U: ?Sized

impl<T, U> TapBorrow<U> for T where
    U: ?Sized

impl<T> TapDeref for T

impl<T> TryConv for T

impl<T> TryConv for T

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