use std::sync::LazyLock;
use crate::bench::BenchOptions;
pub struct EntryMeta {
pub display_name: &'static str,
pub raw_name: &'static str,
pub module_path: &'static str,
pub location: EntryLocation,
pub bench_options: Option<LazyLock<BenchOptions<'static>>>,
}
#[derive(Clone, Copy, Default, PartialEq, Eq, PartialOrd, Ord)]
#[allow(missing_docs)]
pub struct EntryLocation {
pub file: &'static str,
pub line: u32,
pub col: u32,
}
impl EntryMeta {
#[inline]
pub(crate) fn bench_options(&self) -> Option<&BenchOptions> {
self.bench_options.as_deref()
}
#[inline]
pub(crate) fn module_path_components<'a>(&self) -> impl Iterator<Item = &'a str> {
self.module_path.split("::")
}
}