pub struct SecurityClass(/* private fields */);Expand description
SELinux security class.
Implementations§
Source§impl SecurityClass
impl SecurityClass
Sourcepub fn value(&self) -> security_class_t
pub fn value(&self) -> security_class_t
Return the security class value.
Sourcepub fn new(class: security_class_t) -> Result<Self>
pub fn new(class: security_class_t) -> Result<Self>
Create a new security class, if given a non-zero class.
Sourcepub fn from_name(name: &str) -> Result<Self>
pub fn from_name(name: &str) -> Result<Self>
Return the security class corresponding to the string name, if such class exists.
See: string_to_security_class().
Sourcepub unsafe fn access_vector_bit_name(
&self,
access_vector: access_vector_t,
) -> Result<&'static CStr>
pub unsafe fn access_vector_bit_name( &self, access_vector: access_vector_t, ) -> Result<&'static CStr>
Return the name of the access_vector of this security class.
See: security_av_perm_to_string().
§Safety
The returned string must not be modified or freed.
Sourcepub fn access_vector_bit(&self, name: &str) -> Result<access_vector_t>
pub fn access_vector_bit(&self, name: &str) -> Result<access_vector_t>
Return the access vector bit corresponding to the given name and this security class.
See: string_to_av_perm().
Sourcepub fn full_access_vector_name(
&self,
access_vector: access_vector_t,
) -> Result<CAllocatedBlock<c_char>>
pub fn full_access_vector_name( &self, access_vector: access_vector_t, ) -> Result<CAllocatedBlock<c_char>>
Compute a full access vector string representation using this security
class and access_vector, which may have multiple bits set.
See: security_av_string().
Trait Implementations§
Source§impl Clone for SecurityClass
impl Clone for SecurityClass
Source§fn clone(&self) -> SecurityClass
fn clone(&self) -> SecurityClass
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SecurityClass
impl Debug for SecurityClass
Source§impl Display for SecurityClass
impl Display for SecurityClass
Source§impl Hash for SecurityClass
impl Hash for SecurityClass
Source§impl Ord for SecurityClass
impl Ord for SecurityClass
Source§fn cmp(&self, other: &SecurityClass) -> Ordering
fn cmp(&self, other: &SecurityClass) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for SecurityClass
impl PartialEq for SecurityClass
Source§impl PartialOrd for SecurityClass
impl PartialOrd for SecurityClass
Source§impl TryFrom<FileAccessMode> for SecurityClass
impl TryFrom<FileAccessMode> for SecurityClass
impl Copy for SecurityClass
impl Eq for SecurityClass
impl StructuralPartialEq for SecurityClass
Auto Trait Implementations§
impl Freeze for SecurityClass
impl RefUnwindSafe for SecurityClass
impl Send for SecurityClass
impl Sync for SecurityClass
impl Unpin for SecurityClass
impl UnwindSafe for SecurityClass
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more