pub trait Handler {
type Error: Display;
// Provided methods
fn notified(&mut self, channel: Channel) -> Result<(), Self::Error> { ... }
fn protected(
&mut self,
channel: Channel,
msg_info: MessageInfo,
) -> Result<MessageInfo, Self::Error> { ... }
fn fault(
&mut self,
child: Child,
msg_info: MessageInfo,
) -> Result<Option<MessageInfo>, Self::Error> { ... }
fn take_deferred_action(&mut self) -> Option<DeferredAction> { ... }
}
Expand description
Trait for the application-specific part of a protection domain’s main loop.
Required Associated Types§
Provided Methods§
Sourcefn notified(&mut self, channel: Channel) -> Result<(), Self::Error>
fn notified(&mut self, channel: Channel) -> Result<(), Self::Error>
This method has the same meaning and type as its analog in libmicrokit
.
The default implementation just panics.
Sourcefn protected(
&mut self,
channel: Channel,
msg_info: MessageInfo,
) -> Result<MessageInfo, Self::Error>
fn protected( &mut self, channel: Channel, msg_info: MessageInfo, ) -> Result<MessageInfo, Self::Error>
This method has the same meaning and type as its analog in libmicrokit
.
The default implementation just panics.
Sourcefn fault(
&mut self,
child: Child,
msg_info: MessageInfo,
) -> Result<Option<MessageInfo>, Self::Error>
fn fault( &mut self, child: Child, msg_info: MessageInfo, ) -> Result<Option<MessageInfo>, Self::Error>
This method has the same meaning and type as its analog in libmicrokit
.
The default implementation just panics.
Sourcefn take_deferred_action(&mut self) -> Option<DeferredAction>
fn take_deferred_action(&mut self) -> Option<DeferredAction>
An advanced feature for use by protection domains which seek to coalesce syscalls when possible.
This method is used by the main loop to fuse a queued seL4_Send
call with the next
seL4_Recv
using seL4_NBSendRecv
. Its default implementation just returns None
.