pub struct CtrlCHandler { /* private fields */ }Implementations§
Source§impl CtrlCHandler
impl CtrlCHandler
pub fn new() -> Self
Sourcepub fn respond(&self) -> CtrlCResponse
pub fn respond(&self) -> CtrlCResponse
Tries to receive a response from the receiver channel. Returns the result.
Sourcepub fn should_continue(&self) -> bool
pub fn should_continue(&self) -> bool
Checks if CTRL-C has beed pushed. Returns true if it hasn’t.
Sourcepub fn get_tx(&self) -> Sender<CtrlCResponse>
pub fn get_tx(&self) -> Sender<CtrlCResponse>
Gets the channel sender so it can be used outside of the module.
Trait Implementations§
Source§impl Clone for CtrlCHandler
impl Clone for CtrlCHandler
Source§fn clone(&self) -> CtrlCHandler
fn clone(&self) -> CtrlCHandler
Returns a duplicate 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 CtrlCHandler
impl RefUnwindSafe for CtrlCHandler
impl Send for CtrlCHandler
impl Sync for CtrlCHandler
impl Unpin for CtrlCHandler
impl UnwindSafe for CtrlCHandler
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