pub enum Level {
Passive,
ReadOnly,
Armed {
dangerous: bool,
},
Expired,
}Expand description
What the session may do, always shown in the status bar.
Variants§
Passive
--passive: nothing is transmitted.
ReadOnly
The default: discovery, reads, finite COV and FD registrations.
Armed
A write session is armed; dangerous when the profile allows
dangerous operations in it.
Expired
The worker’s view of an armed session whose time has run out but which nobody has disarmed yet: read-only, named apart in the audit log. The app never shows it.
Implementations§
Source§impl Level
impl Level
Sourcepub fn permits(self, class: Class) -> bool
pub fn permits(self, class: Class) -> bool
Whether a command of class may run at this level. The classes are
the ones the one-shot guard uses (#972): reads from read-only up,
writes in an armed session, device management only in a dangerous
one, and nothing passive.
Sourcepub fn audit_name(self) -> &'static str
pub fn audit_name(self) -> &'static str
The name in audit records.
Trait Implementations§
impl Copy for Level
impl Eq for Level
impl StructuralPartialEq for Level
Auto Trait Implementations§
impl Freeze for Level
impl RefUnwindSafe for Level
impl Send for Level
impl Sync for Level
impl Unpin for Level
impl UnsafeUnpin for Level
impl UnwindSafe for Level
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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