maa_framework/custom.rs
1//! # Custom API of MaaFramework.
2//!
3//! With the custom API, you can create your own custom components and use them in your application.
4//! All you need to do is implement the traits according to your needs.
5//! All the trait functions provide an empty default implementation so you can choose to implement only the functions you need.
6//!
7//! ## Examples
8//!
9//! ```rust
10//! use maa_framework::custom::*;
11//!
12//! struct MyCustomController;
13//!
14//! impl custom_controller::MaaCustomController for MyCustomController {
15//! fn connect(&mut self) -> bool {
16//! // Your implementation here
17//! true
18//! }
19//! }
20
21#[cfg(feature = "custom_controller")]
22#[doc(cfg(feature = "custom_controller"))]
23pub mod custom_controller;
24
25#[cfg(feature = "custom_recognizer")]
26#[doc(cfg(feature = "custom_recognizer"))]
27pub mod custom_recognizer;
28
29#[cfg(feature = "custom_action")]
30#[doc(cfg(feature = "custom_action"))]
31pub mod custom_action;