1//! This crate contains the LaunchDarkly Rust SDK feature flag evaluation engine.
2//!
3//! Normal use of the Rust SDK does not require referencing this crate directly. It is used internally
4//! by the SDK, but is published and versioned separately so it can be used in other LaunchDarkly
5//! components without making the SDK versioning dependent on these internal APIs.
67#![deny(rustdoc::missing_crate_level_docs)]
8#![deny(missing_docs)]
910mod attribute_value;
11mod contexts;
12mod eval;
13mod flag;
14mod flag_value;
15mod rule;
16mod segment;
17mod store;
18mod test_common;
19mod util;
20mod variation;
2122pub use attribute_value::AttributeValue;
23pub use contexts::attribute_reference::Reference;
24pub use contexts::context::{Context, ContextAttributes, Kind};
25pub use contexts::context_builder::{ContextBuilder, MultiContextBuilder};
26pub use eval::*;
27pub use flag::*;
28pub use flag_value::*;
29pub use rule::*;
30pub use segment::*;
31pub use store::*;
32pub use variation::*;
3334/// Trait indicating that the item is versioned.
35pub trait Versioned {
36/// Retrieve the version for this item instance.
37fn version(&self) -> u64;
3839/// Determine if this item's version is greater than or equal to the provided version
40 /// parameter.
41fn is_greater_than_or_equal(&self, version: u64) -> bool {
42self.version() >= version
43 }
44}
4546#[cfg(test)]
47pub(crate) mod proptest_generators {
48pub(crate) use crate::contexts::attribute_reference::proptest_generators::*;
49pub(crate) use crate::contexts::context::proptest_generators::*;
50pub(crate) use crate::rule::proptest_generators::*;
51pub(crate) use crate::variation::proptest_generators::*;
52}