pub struct BackgroundRunner { /* private fields */ }Implementations§
Source§impl BackgroundRunner
impl BackgroundRunner
pub fn new( registry: TaskExecutorRegistry, config: BackgroundRunnerConfig, ) -> Self
pub fn subscribe(&self) -> Receiver<RoderEvent>
pub fn processes(&self) -> ProcessRegistry
pub async fn submit( &self, executor_id: impl Into<TaskExecutorId>, input: Value, options: TaskSubmitOptions, ) -> Result<TaskHandle>
pub async fn cancel( &self, task_id: &str, reason: Option<String>, ) -> Result<bool>
pub async fn list(&self) -> Vec<TaskHandle>
pub async fn get(&self, task_id: &str) -> Option<TaskHandle>
pub async fn logs(&self, task_id: &str) -> Option<(Vec<TaskLogEntry>, u64)>
pub async fn handle_event(&self, envelope: &EventEnvelope) -> Result<()>
Trait Implementations§
Source§impl Clone for BackgroundRunner
impl Clone for BackgroundRunner
Source§fn clone(&self) -> BackgroundRunner
fn clone(&self) -> BackgroundRunner
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 moreAuto Trait Implementations§
impl !RefUnwindSafe for BackgroundRunner
impl !UnwindSafe for BackgroundRunner
impl Freeze for BackgroundRunner
impl Send for BackgroundRunner
impl Sync for BackgroundRunner
impl Unpin for BackgroundRunner
impl UnsafeUnpin for BackgroundRunner
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