pub struct PollingSignals { /* private fields */ }Expand description
A filesystem path based way to poll for ‘signals’. Cloning makes another receiver that checks independently from the original (but both receive the same ‘signals’).
Implementations§
Source§impl PollingSignals
impl PollingSignals
pub fn open(path: &Path, initial_value: u64) -> Result<Self, IPCAtomicError>
Sourcepub fn get_number_of_signals(&mut self) -> u64
pub fn get_number_of_signals(&mut self) -> u64
Check how many signals were received since the last check.
Sourcepub fn got_signals(&mut self) -> bool
pub fn got_signals(&mut self) -> bool
Check whether there were any signals (just
get_number_of_signals() > 0)
Sourcepub fn send_signal(&mut self) -> u64
pub fn send_signal(&mut self) -> u64
Send one signal. This is excluded from this PollingSignals
instance, i.e. get_number_of_signals() will not report
it. Returns the previous value.
pub fn sender(&self) -> PollingSignalsSender
Trait Implementations§
Source§impl Clone for PollingSignals
impl Clone for PollingSignals
Source§fn clone(&self) -> PollingSignals
fn clone(&self) -> PollingSignals
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for PollingSignals
impl RefUnwindSafe for PollingSignals
impl Send for PollingSignals
impl Sync for PollingSignals
impl Unpin for PollingSignals
impl UnwindSafe for PollingSignals
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