pub(super) trait Desk {
// Required methods
fn kind(&mut self) -> Kind;
fn inhibit(&mut self, reason: &str) -> Result<Box<dyn Held>, String>;
fn plasma_shows_doses(&self) -> bool;
fn banners(&self) -> Result<bool, String>;
fn set_banners(&self, shown: bool) -> Result<(), String>;
fn watch_banners(&self) -> Option<Box<dyn Heard>>;
fn sandboxed(&self) -> bool;
fn inhibited(&self) -> Option<bool>;
fn plasma_until(&self) -> Option<i64>;
fn clear_plasma_until(&self) -> Result<(), String>;
fn follow(
&self,
kind: &Kind,
quiet: Arc<Mutex<Instant>>,
told: Arc<dyn Fn(bool) + Send + Sync>,
) -> Option<Box<dyn Watching>>;
}Expand description
The session’s side, behind a trait: tested with a stand-in.
Required Methods§
fn kind(&mut self) -> Kind
Sourcefn inhibit(&mut self, reason: &str) -> Result<Box<dyn Held>, String>
fn inhibit(&mut self, reason: &str) -> Result<Box<dyn Held>, String>
Plasma’s inhibition for reason, held until released or dropped.
Sourcefn plasma_shows_doses(&self) -> bool
fn plasma_shows_doses(&self) -> bool
Whether Plasma shows Sioul’s notifications during its do-not-disturb.
GNOME’s banners shown (its Do Not Disturb off).
dconf’s changes of GNOME’s switch, heard from now on.
Sourcefn inhibited(&self) -> Option<bool>
fn inhibited(&self) -> Option<bool>
The notification server’s Inhibited now: Plasma’s do-not-disturb, whatever its cause.
Sourcefn plasma_until(&self) -> Option<i64>
fn plasma_until(&self) -> Option<i64>
The end of Plasma’s own do-not-disturb ([DoNotDisturb] Until, Unix seconds), when ahead.
Sourcefn clear_plasma_until(&self) -> Result<(), String>
fn clear_plasma_until(&self) -> Result<(), String>
Plasma’s own do-not-disturb ended: Until deleted, Plasma told.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".