pub struct SignalFlags {
pub sigusr1: Arc<AtomicBool>,
pub sigwinch: Arc<AtomicBool>,
}Expand description
Shared flags set by signal handlers and polled by the main loop.
Fields§
§sigusr1: Arc<AtomicBool>Set when SIGUSR1 has been received (FR-030 — re-stat input file).
sigwinch: Arc<AtomicBool>Set when SIGWINCH has been received (FR-019 — re-query terminal width).
Implementations§
Source§impl SignalFlags
impl SignalFlags
Sourcepub fn take_sigusr1(&self) -> bool
pub fn take_sigusr1(&self) -> bool
Atomically consume the SIGUSR1 flag. Returns true if it was set.
Sourcepub fn take_sigwinch(&self) -> bool
pub fn take_sigwinch(&self) -> bool
Atomically consume the SIGWINCH flag. Returns true if it was set.
Trait Implementations§
Source§impl Clone for SignalFlags
impl Clone for SignalFlags
Source§fn clone(&self) -> SignalFlags
fn clone(&self) -> SignalFlags
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SignalFlags
impl Debug for SignalFlags
Source§impl Default for SignalFlags
impl Default for SignalFlags
Source§fn default() -> SignalFlags
fn default() -> SignalFlags
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SignalFlags
impl RefUnwindSafe for SignalFlags
impl Send for SignalFlags
impl Sync for SignalFlags
impl Unpin for SignalFlags
impl UnsafeUnpin for SignalFlags
impl UnwindSafe for SignalFlags
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