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
use Arc;
use crate;
/// A [`LabelModelService`] is a persistent builder of [LabelModel] instances.
/// Building a [`LabelModelService`] may require parametrizing the label model
/// based on the incoming query.
/// The service then builds a [LabelModel] instance for each route query.
/// [`LabelModelService`] must be read across the thread pool and so it implements
/// Send and Sync.
///
/// The service acts as an intermediate layer between the [LabelModelBuilder] and
/// the [LabelModel]. While the builder creates the service once during application
/// startup, the service can create multiple model instances customized for each
/// individual query.
///
/// [LabelModel]: routee_compass_core::model::label::LabelModel
/// [LabelModelBuilder]: super::label_model_builder::LabelModelBuilder