pub struct VMHooksEarlyExit {
pub code: u64,
pub message: Cow<'static, str>,
}
Expand description
Contains details regarding an early exit triggered by a VM hook.
It doesn’t have to be an error, for instance in the case of legacy async calls execution is intentionally halted early.
Fields§
§code: u64
§message: Cow<'static, str>
Implementations§
Source§impl VMHooksEarlyExit
impl VMHooksEarlyExit
pub fn new(code: u64) -> Self
pub fn with_const_message(self, message: &'static str) -> Self
pub fn with_message(self, message: String) -> Self
Trait Implementations§
Source§impl Clone for VMHooksEarlyExit
impl Clone for VMHooksEarlyExit
Source§fn clone(&self) -> VMHooksEarlyExit
fn clone(&self) -> VMHooksEarlyExit
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for VMHooksEarlyExit
impl Debug for VMHooksEarlyExit
Source§impl Display for VMHooksEarlyExit
impl Display for VMHooksEarlyExit
Source§impl Error for VMHooksEarlyExit
impl Error for VMHooksEarlyExit
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for VMHooksEarlyExit
impl RefUnwindSafe for VMHooksEarlyExit
impl Send for VMHooksEarlyExit
impl Sync for VMHooksEarlyExit
impl Unpin for VMHooksEarlyExit
impl UnwindSafe for VMHooksEarlyExit
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