pub struct Hosted<H: 'static> { /* private fields */ }Expand description
A loaded blue program whose definitions a host can call.
Implementations§
Source§impl<H: 'static> Hosted<H>
impl<H: 'static> Hosted<H>
Sourcepub fn call_budgeted(
&mut self,
name: &str,
args: Vec<Value>,
host: &mut H,
budget: Budget,
) -> Result<Value, CallError>
pub fn call_budgeted( &mut self, name: &str, args: Vec<Value>, host: &mut H, budget: Budget, ) -> Result<Value, CallError>
Call the definition name with args under budget, which starts
unspent for this call. Running past it is CallError::Exhausted,
told apart from a raise.
§Errors
CallError: the name is not a function, or the call ran out or
raised.
Auto Trait Implementations§
impl<H> !Freeze for Hosted<H>
impl<H> !RefUnwindSafe for Hosted<H>
impl<H> !UnwindSafe for Hosted<H>
impl<H> Send for Hosted<H>where
Interpreter<H>: Send,
impl<H> Sync for Hosted<H>where
Interpreter<H>: Sync,
impl<H> Unpin for Hosted<H>where
Interpreter<H>: Unpin,
impl<H> UnsafeUnpin for Hosted<H>where
Interpreter<H>: UnsafeUnpin,
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