Skip to main content

SessionBackend

Trait SessionBackend 

Source
pub trait SessionBackend {
    // Required methods
    fn sessions(&self) -> Result<Vec<SessionInfo>, Outcome>;
    fn power(&self) -> Option<PowerSource>;

    // Provided methods
    fn compositor_running(&self, _s: &SessionInfo) -> Option<bool> { ... }
    fn foreground(&self) -> Vec<String> { ... }
}

Required Methods§

Provided Methods§

Source

fn compositor_running(&self, _s: &SessionInfo) -> Option<bool>

Whether a compositor runs in this session’s own cgroup (§9); None if the backend cannot see.

Source

fn foreground(&self) -> Vec<String>

Sessions in which foreground work holds (§10: a GameMode client, a gamescope session, …): Condition::Foreground.

Implementors§