pub struct Watch { /* private fields */ }Expand description
Where a badge is read from, for a surface that asks more than once per process: the state
directory (the plain one, never a profile’s — an install belongs to the machine user) and the
[update] section that decides whether there is anything to say. Reading it is two small
files, so a frame or a request may ask again rather than cache the answer in memory.
Implementations§
Source§impl Watch
impl Watch
Sourcepub fn for_env(env: EnvFn<'_>, cfg: &UpdateConfig) -> Option<Watch>
pub fn for_env(env: EnvFn<'_>, cfg: &UpdateConfig) -> Option<Watch>
The watch for a process’s own environment. None when the user asked not to be told
(check = "off") or when there is no state directory to look in: both mean no badge.
Sourcepub fn at(state: PathBuf, cfg: &UpdateConfig) -> Watch
pub fn at(state: PathBuf, cfg: &UpdateConfig) -> Watch
The watch for a process that resolved its own state directory — the gateway, whose environment is the unit’s, not a shell’s.
Trait Implementations§
impl Eq for Watch
impl StructuralPartialEq for Watch
Auto Trait Implementations§
impl Forget for Watch
impl Freeze for Watch
impl Move for Watch
impl RefUnwindSafe for Watch
impl Send for Watchwhere
RawVecInner: Send,
impl Sync for Watchwhere
RawVecInner: Sync,
impl Unpin for Watch
impl UnsafeUnpin for Watch
impl UnwindSafe for Watchwhere
RawVecInner: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.