[][src]Macro kernel::create_capability

macro_rules! create_capability {
    ($T:ty) => { ... };
}

Create an object with the given capability.

This example is not tested
use kernel::capabilities::ProcessManagementCapability;
#[macro_use(create_capability)]
use kernel;

let process_mgmt_cap = create_capability!(ProcessManagementCapability);

This helper macro can only be called in an unsafe block, and is used by trusted code to generate a capability that it can either use or pass to another module.