1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
//! Trait for compile-time task registration.
//!
//! This module provides the `TaskDefinition` trait that each task output type
//! implements to provide metadata for the task system. This decentralizes
//! task metadata from the central macro to individual task modules.
use Debug;
/// Trait for compile-time task registration.
///
/// Implemented by each task's output type to provide metadata for enum generation
/// and dynamic dispatch. The trait constants are used by the `define_task_system!`
/// macro to generate documentation and helper methods.
///
/// # Example
///
/// ```rust,ignore
/// use oar_ocr_core::core::traits::TaskDefinition;
///
/// #[derive(Debug, Clone)]
/// pub struct MyTaskOutput {
/// pub results: Vec<String>,
/// }
///
/// impl TaskDefinition for MyTaskOutput {
/// const TASK_NAME: &'static str = "my_task";
/// const TASK_DOC: &'static str = "My custom task for processing data";
///
/// fn empty() -> Self {
/// Self { results: Vec::new() }
/// }
/// }
/// ```