pub mod dto;
pub mod error;
pub mod import;
pub mod mapper;
#[cfg(all(feature = "yaml", feature = "polars"))]
pub use load::spec_from_str;
#[cfg(all(feature = "yaml", feature = "polars"))]
mod load {
use super::error::YamlError;
use crate::infrastructure::polars::kind::PolarsKind;
use crate::interface::yaml::dto::kind::polars::PolarsKindYaml;
use crate::interface::yaml::dto::spec::SpecYaml;
use crate::spec::Spec;
pub fn spec_from_str(s: &str) -> Result<Spec<PolarsKind>, YamlError> {
let yaml: SpecYaml<PolarsKindYaml> = serde_yaml::from_str(s).map_err(YamlError::Parse)?;
Spec::try_from(yaml).map_err(YamlError::Spec)
}
}