Struct endbasic_std::MachineBuilder[][src]

pub struct MachineBuilder { /* fields omitted */ }

Builder pattern to construct an EndBASIC interpreter.

Unless otherwise specified, the interpreter is connected to a terminal-based console.

Implementations

impl MachineBuilder[src]

pub fn with_console(self, console: Rc<RefCell<dyn Console>>) -> Self[src]

Overrides the default terminal-based console with the given one.

pub fn with_gpio_pins(self, pins: Rc<RefCell<dyn Pins>>) -> Self[src]

Overrides the default hardware-based GPIO pins with the given ones.

pub fn with_sleep_fn(self, sleep_fn: SleepFn) -> Self[src]

Overrides the default sleep function with the given one.

pub fn build(self) -> Result<Machine>[src]

Builds the interpreter.

pub fn make_interactive(self) -> InteractiveMachineBuilder[src]

Extends the machine with interactive (REPL) features.

Trait Implementations

impl Default for MachineBuilder[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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,