pub struct SecurityContextList { /* private fields */ }Expand description
List of security contexts.
Implementations§
Source§impl SecurityContextList
impl SecurityContextList
Sourcepub fn of_se_user(
se_user: &str,
level: Option<&str>,
reachable_from_context: Option<&SecurityContext<'_>>,
) -> Result<Self>
pub fn of_se_user( se_user: &str, level: Option<&str>, reachable_from_context: Option<&SecurityContext<'_>>, ) -> Result<Self>
Obtain a list of contexts, for the specified SELinux user identity,
that are reachable from the specified reachable_from_context.
See: get_ordered_context_list(), get_ordered_context_list_with_level().
Sourcepub fn get(&self, index: usize, raw_format: bool) -> Option<SecurityContext<'_>>
pub fn get(&self, index: usize, raw_format: bool) -> Option<SecurityContext<'_>>
Return the security context at the given index, if the index is valid.
⚠️ The returned instance does NOT own the context. When the returned instance get dropped, it will NOT deallocate the provided context. Deallocation of the context will only happen when the whole list gets dropped.
Sourcepub fn user_selected_context(
&self,
raw_format: bool,
) -> Result<SecurityContext<'_>>
pub fn user_selected_context( &self, raw_format: bool, ) -> Result<SecurityContext<'_>>
Ask the user via stdin/stdout as to which context they want from
this list of contexts, and return a new context as selected by the user.
See: query_user_context().
Trait Implementations§
Source§impl Debug for SecurityContextList
impl Debug for SecurityContextList
Source§impl PartialEq for SecurityContextList
impl PartialEq for SecurityContextList
impl Eq for SecurityContextList
Auto Trait Implementations§
impl Freeze for SecurityContextList
impl RefUnwindSafe for SecurityContextList
impl !Send for SecurityContextList
impl !Sync for SecurityContextList
impl Unpin for SecurityContextList
impl UnwindSafe for SecurityContextList
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