pub struct Pulser { /* private fields */ }Expand description
The watcher’s side of the pulse, one tick at a time.
Everything is re-read on each tick - the config, today’s workday - so
kasl server pulse enable and disable take effect within a tick, with no
restart and no second channel into the watcher.
Implementations§
Source§impl Pulser
impl Pulser
Sourcepub fn new(in_pause: Arc<AtomicBool>) -> Self
pub fn new(in_pause: Arc<AtomicBool>) -> Self
A pulser reading the pause from in_pause and the token from the OS
keyring.
Sourcepub fn with_token(
in_pause: Arc<AtomicBool>,
token: Box<dyn Fn() -> Option<String> + Send + Sync>,
) -> Self
pub fn with_token( in_pause: Arc<AtomicBool>, token: Box<dyn Fn() -> Option<String> + Send + Sync>, ) -> Self
A pulser taking its token from token - the keyring is not reachable
from every test runner.
Auto Trait Implementations§
impl !Freeze for Pulser
impl !RefUnwindSafe for Pulser
impl !Sync for Pulser
impl !UnwindSafe for Pulser
impl Send for Pulser
impl Unpin for Pulser
impl UnsafeUnpin for Pulser
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