Skip to main content
KeyOS API Reference

permission_set

Macro permission_set 

Source
macro_rules! permission_set {
    (
        $(#[doc = $doc:expr])*
        $vis:vis trait $name:ident $(: $($set:path),+)? {
            $($msg:path),+ $(,)?
        }
    ) => { ... };
}
Expand description

Define a named set of message permissions, plus the blanket impl that makes every permissions type granting those messages a member of it.

The set always requires CheckedPermissions; listing other sets after the colon composes them.

permission_set!(pub trait ThemePermissions { GetSystemTheme, SetSystemTheme });

permission_set!(pub trait FileBackedPermissions: DurableFilePermissions {
    CreateDirMessage, CloseDir
});