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
use crateWorkloadApiError;
use crateWorkloadApiClient;
use crateX509Svid;
use Future;
use Pin;
use Arc;
/// Strategy for selecting an X.509 SVID when multiple SVIDs are available.
///
/// Implement this trait to customize SVID selection logic. The picker is called whenever
/// a new X.509 context is received from the Workload API.
///
/// # Example
///
/// ```no_run
/// use spiffe::X509Svid;
/// use std::sync::Arc;
/// use spiffe::x509_source::SvidPicker;
///
/// #[derive(Debug)]
/// struct HintPicker {
/// hint: String,
/// }
///
/// impl SvidPicker for HintPicker {
/// fn pick_svid(&self, svids: &[Arc<X509Svid>]) -> Option<usize> {
/// svids.iter()
/// .position(|svid| svid.hint() == Some(&self.hint))
/// }
/// }
/// ```
pub type ClientFuture =
;
pub type ClientFactory = ;