Struct garage_block::repair::ScrubWorker
source · pub struct ScrubWorker { /* private fields */ }
Trait Implementations§
source§impl Worker for ScrubWorker
impl Worker for ScrubWorker
fn name(&self) -> String
fn status(&self) -> WorkerStatus
source§fn work<'life0, 'life1, 'async_trait>(
&'life0 mut self,
_must_exit: &'life1 mut Receiver<bool>
) -> Pin<Box<dyn Future<Output = Result<WorkerState, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn work<'life0, 'life1, 'async_trait>(
&'life0 mut self,
_must_exit: &'life1 mut Receiver<bool>
) -> Pin<Box<dyn Future<Output = Result<WorkerState, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Work: do a basic unit of work, if one is available (otherwise, should return
WorkerState::Idle immediately). We will do our best to not interrupt this future in the
middle of processing, it will only be interrupted at the last minute when Garage is trying
to exit and this hasn’t returned yet. This function may return an error to indicate that
its unit of work could not be processed due to an error: the error will be logged and
.work() will be called again after a short delay.
source§fn wait_for_work<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = WorkerState> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn wait_for_work<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = WorkerState> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Wait for work: await for some task to become available. This future can be interrupted in
the middle for any reason, for example if an interrupt signal was recieved.
Auto Trait Implementations§
impl Freeze for ScrubWorker
impl !RefUnwindSafe for ScrubWorker
impl Send for ScrubWorker
impl Sync for ScrubWorker
impl Unpin for ScrubWorker
impl !UnwindSafe for ScrubWorker
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