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
50
51
//! `ServiceHandler` — protoc-gen handler meta-trait.
//!
//! Every `{Service}Handler` trait emitted by `protoc-gen-actrframework`
//! inherits from this trait and binds its `Workload` associated type to the
//! code-generated `{Service}Workload<Self>` wrapper. The `entry!` macro (and
//! anything else downstream of protoc-gen) can therefore recover the
//! concrete `Workload` type from just the handler type — `W = <H as
//! ServiceHandler>::Workload` — without re-deriving it by name mangling.
//!
//! Per Option U γ-unified §4.5 / Phase 6b `protoc-gen` design:
//!
//! ```rust,ignore
//! // Generated
//! pub trait EchoServiceHandler:
//! actr_framework::ServiceHandler<Workload = EchoServiceWorkload<Self>>
//! { ... }
//! ```
//!
//! The trait is deliberately minimal — the only thing it promises is the
//! mapping from the user's domain-specific handler type to the
//! `Workload`-implementing wrapper that `entry!` will eventually register.
//! No runtime methods are added; `ServiceHandler` is a pure type-level
//! associator.
use crateWorkload;
/// Associator trait emitted by protoc-gen: maps a user-implemented handler
/// type to the generated `{Service}Workload<Self>` wrapper.
///
/// Users never implement this trait by hand; the generator's
/// `{Service}Handler` trait expands into a super-trait bound on it so the
/// framework can recover `type Workload` without name mangling.
///
/// # Design notes
///
/// - `MaybeSendSync + 'static` mirrors the bound on every
/// `{Service}Handler`, so downstream generic code can compose
/// `ServiceHandler` bounds into dispatcher-generic functions without
/// re-stating the auto-trait marker.
/// - The associated type pins a concrete `Workload` impl, not a `dyn
/// Workload`. Static dispatch all the way down — matching the rest of
/// the framework's zero-cost abstractions.