pub struct MeowClient { /* private fields */ }Implementations§
Source§impl MeowClient
impl MeowClient
pub fn new(config: MeowConfig) -> Self
pub fn register_global_progress_listener<F>( &self, listener: F, ) -> Result<GlobalProgressListenerId, MeowError>
Sourcepub fn unregister_global_progress_listener(
&self,
id: GlobalProgressListenerId,
) -> Result<bool, MeowError>
pub fn unregister_global_progress_listener( &self, id: GlobalProgressListenerId, ) -> Result<bool, MeowError>
移除此前注册的一个全局监听;若 id 不存在则返回 false。
pub fn clear_global_listener(&self) -> Result<(), MeowError>
Sourcepub fn set_debug_log_listener(
&self,
listener: Option<DebugLogListener>,
) -> Result<(), DebugLogListenerError>
pub fn set_debug_log_listener( &self, listener: Option<DebugLogListener>, ) -> Result<(), DebugLogListenerError>
设置或取消流程调试日志监听器(全局生效)。
- 传入
Some(listener):设置/替换监听器 - 传入
None:取消注册监听器
Source§impl MeowClient
impl MeowClient
pub async fn enqueue<PCB>( &self, task: PounceTask, progress_cb: PCB, ) -> Result<TaskId, MeowError>
pub async fn pause(&self, task_id: TaskId) -> Result<(), MeowError>
Sourcepub async fn resume(&self, task_id: TaskId) -> Result<(), MeowError>
pub async fn resume(&self, task_id: TaskId) -> Result<(), MeowError>
恢复一个此前被 pause 的任务,继续使用同一个 task_id 进行控制。
pub async fn cancel(&self, task_id: TaskId) -> Result<(), MeowError>
pub async fn snapshot(&self) -> Result<TransferSnapshot, MeowError>
pub async fn close(&self) -> Result<(), MeowError>
pub async fn is_closed(&self) -> bool
Trait Implementations§
Source§impl Clone for MeowClient
impl Clone for MeowClient
Source§fn clone(&self) -> MeowClient
fn clone(&self) -> MeowClient
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 MeowClient
impl !RefUnwindSafe for MeowClient
impl Send for MeowClient
impl Sync for MeowClient
impl Unpin for MeowClient
impl UnsafeUnpin for MeowClient
impl !UnwindSafe for MeowClient
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