pub struct Features(/* private fields */);Expand description
A simple list of features for annotating gated benchmarks/inputs.
Features supports one of the following four patterns:
A singular feature:
use diskann_benchmark_runner::Features;
let features = Features::new("a");
assert_eq!(features.to_string(), "feature \"a\"");A conjunction:
use diskann_benchmark_runner::Features;
let features = Features::all(["a", "b"]);
assert_eq!(features.to_string(), "features \"a\" and \"b\"");A disjunction:
use diskann_benchmark_runner::Features;
let features = Features::any(["a", "b"]);
assert_eq!(features.to_string(), "features \"a\" or \"b\"");A custom layout:
use diskann_benchmark_runner::Features;
let features = Features::custom("(\"a\" and \"b\") or \"c\"", true);
assert_eq!(features.to_string(), "features (\"a\" and \"b\") or \"c\"");See: crate::Registry::register_gated and crate::Registry::register_partially_gated.
Implementations§
Trait Implementations§
impl Eq for Features
Source§impl Ord for Features
impl Ord for Features
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for Features
impl PartialOrd for Features
impl StructuralPartialEq for Features
Auto Trait Implementations§
impl Freeze for Features
impl RefUnwindSafe for Features
impl Send for Features
impl Sync for Features
impl Unpin for Features
impl UnsafeUnpin for Features
impl UnwindSafe for Features
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more