pub trait Host {
// Required methods
fn exit(&mut self, status: Result<(), ()>) -> Result<()>;
fn exit_with_code(&mut self, status_code: u8) -> Result<()>;
}p3 only.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.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl<_T: Host + ?Sized> Host for &mut _T
impl<_T: Host + ?Sized> 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.