Struct maa_framework::internal::MaaCustomActionAPI
source · #[repr(C)]pub struct MaaCustomActionAPI {
pub run: Option<unsafe extern "C" fn(sync_context: MaaSyncContextHandle, task_name: MaaStringView, custom_action_param: MaaStringView, cur_box: MaaRectHandle, cur_rec_detail: MaaStringView, action_arg: MaaTransparentArg) -> MaaBool>,
pub stop: Option<unsafe extern "C" fn(action_arg: MaaTransparentArg)>,
}
Available on crate feature
internal
only.Expand description
@brief The custom action API.
To create a custom action, you need to implement this API.
You do not have to implement all the functions in this API. Instead, just implement the functions you need. Do note that if an unimplemented function is called, the framework will likely crash.
Fields§
§run: Option<unsafe extern "C" fn(sync_context: MaaSyncContextHandle, task_name: MaaStringView, custom_action_param: MaaStringView, cur_box: MaaRectHandle, cur_rec_detail: MaaStringView, action_arg: MaaTransparentArg) -> MaaBool>
§stop: Option<unsafe extern "C" fn(action_arg: MaaTransparentArg)>
Trait Implementations§
source§impl Clone for MaaCustomActionAPI
impl Clone for MaaCustomActionAPI
source§fn clone(&self) -> MaaCustomActionAPI
fn clone(&self) -> MaaCustomActionAPI
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 Debug for MaaCustomActionAPI
impl Debug for MaaCustomActionAPI
impl Copy for MaaCustomActionAPI
Auto Trait Implementations§
impl Freeze for MaaCustomActionAPI
impl RefUnwindSafe for MaaCustomActionAPI
impl Send for MaaCustomActionAPI
impl Sync for MaaCustomActionAPI
impl Unpin for MaaCustomActionAPI
impl UnwindSafe for MaaCustomActionAPI
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