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
use crate*;
/// Typed app-facing activation for an ordinary Lash plugin.
///
/// A binding is not a second plugin implementation model. It gives embed hosts
/// typed session configuration and typed per-turn input while still building
/// a normal [`PluginFactory`] whose session plugin registers capabilities
/// through `lash_core::PluginRegistrar`.
///
/// Plugin crates should expose a small domain extension trait over
/// [`TurnBuilder`] for their turn input instead of asking app route code to
/// call [`TurnBuilder::with_plugin_input`] directly:
///
/// ```ignore
/// trait ToneTurnExt {
/// fn with_tone(self, tone: Tone) -> Self;
/// }
///
/// impl ToneTurnExt for lash::TurnBuilder {
/// fn with_tone(self, tone: Tone) -> Self {
/// self.with_plugin_input::<TonePlugin>(ToneInput { tone })
/// }
/// }
/// ```
pub