pub enum Condition {
Always,
SessionEstablished {
uid: Option<u32>,
seated: bool,
},
DeviceConnected(UnitId),
OnAcPower,
OnBattery,
Foreground {
session: String,
},
All(Vec<Condition>),
Any(Vec<Condition>),
}Variants§
Always
SessionEstablished
logind reports a session of class user with a seat, or a remote user
session; greeter, manager and background sessions never count (§10).
seated asks for a session at a seat: the graphical expectation
(S05), which an SSH-only login never carries. As an atom (what holds
now), it says whether that session has a seat.
DeviceConnected(UnitId)
OnAcPower
OnBattery
Foreground
Quiet mode (§12f; signals in §10): a GameMode client, a gamescope session, a fullscreen surface holding an idle-inhibitor, or Do Not Disturb.
All(Vec<Condition>)
Any(Vec<Condition>)
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Condition
impl<'de> Deserialize<'de> for Condition
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Ord for Condition
impl Ord for Condition
Source§impl PartialOrd for Condition
impl PartialOrd for Condition
impl Eq for Condition
impl StructuralPartialEq for Condition
Auto Trait Implementations§
impl Freeze for Condition
impl RefUnwindSafe for Condition
impl Send for Condition
impl Sync for Condition
impl Unpin for Condition
impl UnsafeUnpin for Condition
impl UnwindSafe for Condition
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