launchdarkly_server_sdk_evaluation/
store.rs

1use crate::flag::Flag;
2use crate::segment::Segment;
3
4/// Store is an interface for a data store that holds feature flags and related data received by
5/// the SDK.
6///
7/// Ordinarily, the only implementations of this interface are the default in-memory
8/// implementation, which holds references to actual SDK data model objects.
9pub trait Store {
10    /// Retrieve the flag with key `flag_key`.
11    fn flag(&self, flag_key: &str) -> Option<Flag>;
12
13    /// Retrieve the segment with key `segment_key`.
14    fn segment(&self, segment_key: &str) -> Option<Segment>;
15}