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
52
53
use Default;
/// Options to specify for calls to any decide method
///
/// ```
/// use optimizely::Client;
/// use optimizely::DecideOptions;
/// #
/// # let file_path = "../datafiles/sandbox.json";
/// # let flag_key = "buy_button";
/// # let user_id = "123abc789xyz";
///
/// // Initialize Optimizely client using local datafile
/// let optimizely_client = Client::from_local_datafile(file_path)?
/// .initialize();
///
/// // Create a user context
/// let user_context = optimizely_client.create_user_context(user_id);
///
/// // Specify the desired options
/// let decide_options = DecideOptions {
/// disable_decision_event: true,
/// ..DecideOptions::default()
/// };
///
/// // Make decision but do not send any events
/// let decision = user_context.decide_with_options(flag_key, &decide_options);
///
/// # Ok::<(), Box<dyn std::error::Error>>(())
/// ```