pub struct SignalManager {
pub signals: Arc<Mutex<HashMap<JobId, AstroRunSignal>>>,
}
Fields§
§signals: Arc<Mutex<HashMap<JobId, AstroRunSignal>>>
Implementations§
Source§impl SignalManager
impl SignalManager
pub fn new() -> Self
pub fn register_signal(&self, job_id: JobId, signal: AstroRunSignal)
pub fn unregister_signal(&self, job_id: &JobId)
pub fn get_signal(&self, job_id: &JobId) -> Option<AstroRunSignal>
pub fn cancel_job(&self, job_id: &JobId) -> Result<()>
Trait Implementations§
Source§impl Clone for SignalManager
impl Clone for SignalManager
Source§fn clone(&self) -> SignalManager
fn clone(&self) -> SignalManager
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 moreSource§impl Default for SignalManager
impl Default for SignalManager
Source§fn default() -> SignalManager
fn default() -> SignalManager
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SignalManager
impl !RefUnwindSafe for SignalManager
impl Send for SignalManager
impl Sync for SignalManager
impl Unpin for SignalManager
impl !UnwindSafe for SignalManager
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