use super::{StarlightMap, ValidatedStarlightMap};
use crate::data::bundled::BUNDLED_PRODUCTION_STARLIGHT_AVAILABLE;
use std::sync::Arc;
#[derive(Debug, Clone)]
#[non_exhaustive]
pub enum StarlightProduct {
BundledProductionGaiaDr3,
ExperimentalMap(Arc<StarlightMap>),
ValidatedExternalMap(Arc<ValidatedStarlightMap>),
}
impl StarlightProduct {
pub fn bundled_production_gaia_dr3() -> Self {
Self::BundledProductionGaiaDr3
}
pub fn with_experimental_map(map: StarlightMap) -> Self {
Self::ExperimentalMap(Arc::new(map))
}
pub fn with_shared_experimental_map(map: Arc<StarlightMap>) -> Self {
Self::ExperimentalMap(map)
}
pub fn validated_external(map: ValidatedStarlightMap) -> Self {
Self::ValidatedExternalMap(Arc::new(map))
}
pub fn with_shared_validated_external_map(map: Arc<ValidatedStarlightMap>) -> Self {
Self::ValidatedExternalMap(map)
}
pub const fn bundled_production_available() -> bool {
BUNDLED_PRODUCTION_STARLIGHT_AVAILABLE
}
pub const fn as_str(&self) -> &'static str {
match self {
Self::BundledProductionGaiaDr3 => "bundled-production-gaia-dr3",
Self::ExperimentalMap(_) => "experimental-map",
Self::ValidatedExternalMap(_) => "validated-external-map",
}
}
}