open_feature/evaluation/
options.rs1use crate::Hook;
2
3#[derive(Default, Clone)]
5pub struct EvaluationOptions {
6 pub hooks: Vec<crate::hooks::HookWrapper>,
8
9 pub hints: crate::hooks::HookHints,
11}
12
13impl EvaluationOptions {
14 pub fn new(hooks: Vec<crate::hooks::HookWrapper>, hints: crate::hooks::HookHints) -> Self {
16 Self { hooks, hints }
17 }
18
19 #[must_use]
21 pub fn with_hook<T: Hook + 'static>(mut self, hook: T) -> Self {
22 self.hooks.push(crate::hooks::HookWrapper::new(hook));
23 self
24 }
25}