pub struct TaskManager { /* private fields */ }
Implementations§
Source§impl TaskManager
impl TaskManager
pub async fn new( task_manager_store: Arc<dyn TaskManagerStore>, task_store: Arc<dyn TaskStore>, ) -> BuckyResult<Arc<Self>>
pub fn register_task_factory( &self, factory: impl TaskFactory, ) -> BuckyResult<()>
pub async fn resume_task(&self) -> BuckyResult<()>
pub async fn create_task<P: RawEncode>( &self, dec_id: ObjectId, source: DeviceId, task_type: TaskType, task_param: P, ) -> BuckyResult<TaskId>
pub async fn start_task(&self, task_id: &TaskId) -> BuckyResult<()>
pub async fn check_and_waiting_stop(&self, task_id: &TaskId)
pub async fn get_task_detail_status( &self, task_id: &TaskId, ) -> BuckyResult<Vec<u8>>
pub async fn pause_task(&self, task_id: &TaskId) -> BuckyResult<()>
pub async fn stop_task(&self, task_id: &TaskId) -> BuckyResult<()>
pub async fn remove_task( &self, dec_id: &ObjectId, source: &DeviceId, task_id: &TaskId, ) -> BuckyResult<()>
pub async fn remove_task_by_task_id(&self, task_id: &TaskId) -> BuckyResult<()>
pub async fn get_tasks_by_task_id( &self, task_id_list: &[TaskId], ) -> BuckyResult<Vec<(TaskId, TaskType, TaskStatus, Vec<u8>, Vec<u8>)>>
pub async fn get_tasks_by_category( &self, category: TaskCategory, ) -> BuckyResult<Vec<(TaskId, TaskType, TaskStatus, Vec<u8>, Vec<u8>)>>
Auto Trait Implementations§
impl !Freeze for TaskManager
impl !RefUnwindSafe for TaskManager
impl Send for TaskManager
impl Sync for TaskManager
impl Unpin for TaskManager
impl !UnwindSafe for TaskManager
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more