pub trait Host: Send {
// Required methods
fn exit(&mut self, status: Result<(), ()>) -> Result<()>;
fn exit_with_code(&mut self, status_code: u8) -> Result<()>;
}
Required Methods§
Sourcefn exit(&mut self, status: Result<(), ()>) -> Result<()>
fn exit(&mut self, status: Result<(), ()>) -> Result<()>
Exit the current instance and any linked instances.
Sourcefn exit_with_code(&mut self, status_code: u8) -> Result<()>
fn exit_with_code(&mut self, status_code: u8) -> Result<()>
Exit the current instance and any linked instances, reporting the specified status code to the host.
The meaning of the code depends on the context, with 0 usually meaning “success”, and other values indicating various types of failure.
This function does not return; the effect is analogous to a trap, but without the connotation that something bad has happened.
Implementations on Foreign Types§
Source§impl<_T: Host + ?Sized + Send> Host for &mut _T
impl<_T: Host + ?Sized + Send> Host for &mut _T
Source§fn exit(&mut self, status: Result<(), ()>) -> Result<()>
fn exit(&mut self, status: Result<(), ()>) -> Result<()>
Exit the current instance and any linked instances.
Source§fn exit_with_code(&mut self, status_code: u8) -> Result<()>
fn exit_with_code(&mut self, status_code: u8) -> Result<()>
Exit the current instance and any linked instances, reporting the specified status code to the host.
The meaning of the code depends on the context, with 0 usually meaning “success”, and other values indicating various types of failure.
This function does not return; the effect is analogous to a trap, but without the connotation that something bad has happened.