pub enum HandlerRequest {
IsActive {
responder: HandlerIsActiveResponder,
},
OnException {
exception: Exception,
info: ExceptionInfo,
responder: HandlerOnExceptionResponder,
},
}
Expand description
Protocol meant for clients interested in handling exceptions for a particular service.
Variants§
IsActive
Fields
responder: HandlerIsActiveResponder
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.
OnException
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.
Implementations§
source§impl HandlerRequest
impl HandlerRequest
pub fn into_is_active(self) -> Option<HandlerIsActiveResponder>
pub fn into_on_exception( self ) -> Option<(Exception, ExceptionInfo, HandlerOnExceptionResponder)>
sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL