pub struct HandlerSynchronousProxy { /* private fields */ }
Implementations§
source§impl HandlerSynchronousProxy
impl HandlerSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
sourcepub fn wait_for_event(&self, deadline: Time) -> Result<HandlerEvent, Error>
pub fn wait_for_event(&self, deadline: Time) -> Result<HandlerEvent, Error>
Waits until an event arrives and returns it. It is safe for other threads to make concurrent requests while waiting for an event.
sourcepub fn is_active(&self, ___deadline: Time) -> Result<(), Error>
pub fn is_active(&self, ___deadline: Time) -> Result<(), Error>
Requests the exception handler to send a signal indicating the server is active and able to respond to requests.
It’s recommended clients call IsActive and wait for a response before sending an exception to the server with OnException because a zx.handle:EXCEPTION can’t be released by the client once it’s sent across the channel.
Note: a response guarantees the server was active when it sent the response, but doesn’t preclcude the server being unresponsive after the reply was sent.
sourcepub fn on_exception(
&self,
exception: Exception,
info: &mut ExceptionInfo,
___deadline: Time
) -> Result<(), Error>
pub fn on_exception( &self, exception: Exception, info: &mut ExceptionInfo, ___deadline: Time ) -> Result<(), Error>
This exception mirrors closely the information provided by exception channels. The design is to have clients of this API behave as closely as possible to native exception handlers that are listening to an exception channel.
exception
is an exception handle, which controls the exception’s
lifetime. See exception zircon docs for more information.
info
represents basic exception information as provided by the
exception channel.