pub enum ExtFunctionResult {
Return(MontyObject),
Error(MontyException),
Future(u32),
NotFound(String),
}Expand description
Return value or exception from an external function.
Variants§
Return(MontyObject)
Continues execution with the return value from the external function.
Error(MontyException)
Continues execution with the exception raised by the external function.
Future(u32)
Pending future — the external function is a coroutine.
The u32 is the call_id from the FunctionCall that created this
snapshot. It is used to track the pending future so it can be resolved
later via ResolveFutures::resume().
NotFound(String)
The function was not found, should result in a NameError exception.
Trait Implementations§
Source§impl Debug for ExtFunctionResult
impl Debug for ExtFunctionResult
Source§impl From<MontyException> for ExtFunctionResult
impl From<MontyException> for ExtFunctionResult
Source§fn from(exception: MontyException) -> Self
fn from(exception: MontyException) -> Self
Converts to this type from the input type.
Source§impl From<MontyObject> for ExtFunctionResult
impl From<MontyObject> for ExtFunctionResult
Source§fn from(value: MontyObject) -> Self
fn from(value: MontyObject) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ExtFunctionResult
impl RefUnwindSafe for ExtFunctionResult
impl Send for ExtFunctionResult
impl Sync for ExtFunctionResult
impl Unpin for ExtFunctionResult
impl UnsafeUnpin for ExtFunctionResult
impl UnwindSafe for ExtFunctionResult
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