Trait sel4_microkit::Handler

source ·
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§

source

type Error: Display

Error type returned by this protection domain’s entrypoints.

Provided Methods§

source

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.

source

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.

source

fn fault( &mut self, child: Child, msg_info: MessageInfo ) -> Result<Option<MessageInfo>, Self::Error>

source

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.

Implementors§