pub struct StdHost;Expand description
Default host: no custom builtins, print to stdout.
Trait Implementations§
Source§impl BopHost for StdHost
impl BopHost for StdHost
Source§fn call(
&mut self,
_name: &str,
_args: &[Value],
_line: u32,
) -> Option<Result<Value, BopError>>
fn call( &mut self, _name: &str, _args: &[Value], _line: u32, ) -> Option<Result<Value, BopError>>
Called for unknown function names. Return
None = not handled.Source§fn on_print(&mut self, message: &str)
fn on_print(&mut self, message: &str)
Called by
print(). Default: writes to stdout (std only), panics (no-std).Source§fn function_hint(&self) -> &str
fn function_hint(&self) -> &str
Hint text for “function not found” errors.
Auto Trait Implementations§
impl Freeze for StdHost
impl RefUnwindSafe for StdHost
impl Send for StdHost
impl Sync for StdHost
impl Unpin for StdHost
impl UnsafeUnpin for StdHost
impl UnwindSafe for StdHost
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more