pub struct SecurityContext {
pub label: &'static str,
pub uid: u32,
pub gid: u32,
pub level: SecurityLevel,
}Expand description
Security context for processes
Fields§
§label: &'static strSecurity label/domain
uid: u32User ID
gid: u32Group ID
level: SecurityLevelSecurity level
Implementations§
Source§impl SecurityContext
impl SecurityContext
Sourcepub const fn new(
label: &'static str,
uid: u32,
gid: u32,
level: SecurityLevel,
) -> Self
pub const fn new( label: &'static str, uid: u32, gid: u32, level: SecurityLevel, ) -> Self
Create a new security context
Sourcepub fn can_access(&self, target: &SecurityContext, access: AccessType) -> bool
pub fn can_access(&self, target: &SecurityContext, access: AccessType) -> bool
Check if this context can access another context
Trait Implementations§
Source§impl Clone for SecurityContext
impl Clone for SecurityContext
Source§fn clone(&self) -> SecurityContext
fn clone(&self) -> SecurityContext
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SecurityContext
impl Debug for SecurityContext
Source§impl PartialEq for SecurityContext
impl PartialEq for SecurityContext
impl Copy for SecurityContext
impl Eq for SecurityContext
impl StructuralPartialEq for SecurityContext
Auto Trait Implementations§
impl Freeze for SecurityContext
impl RefUnwindSafe for SecurityContext
impl Send for SecurityContext
impl Sync for SecurityContext
impl Unpin for SecurityContext
impl UnwindSafe for SecurityContext
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)