twizzler_security/sec_ctx/
mod.rs

1use twizzler_abi::object::{ObjID, Protections};
2
3mod base;
4pub use base::*;
5
6#[cfg(feature = "user")]
7mod user;
8
9#[cfg(feature = "user")]
10pub use user::*;
11
12/// Information about protections for a given object within a context.
13#[derive(Clone, Copy, Debug)]
14pub struct PermsInfo {
15    pub ctx: ObjID,
16    pub provide: Protections,
17    pub restrict: Protections,
18}
19
20impl PermsInfo {
21    pub fn new(ctx: ObjID, provide: Protections, restrict: Protections) -> Self {
22        Self {
23            ctx,
24            provide,
25            restrict,
26        }
27    }
28}