pub struct CADSImporter;Expand description
CADS importer for parsing CADS v1.0 YAML files
Implementations§
Source§impl CADSImporter
impl CADSImporter
Sourcepub fn import(&self, yaml_content: &str) -> Result<CADSAsset, ImportError>
pub fn import(&self, yaml_content: &str) -> Result<CADSAsset, ImportError>
Import CADS YAML content and create CADSAsset
§Arguments
yaml_content- CADS YAML content as a string
§Returns
A CADSAsset parsed from the YAML content
§Example
use data_modelling_core::import::cads::CADSImporter;
let importer = CADSImporter::new();
let yaml = r#"
apiVersion: v1.0
kind: AIModel
id: 550e8400-e29b-41d4-a716-446655440000
name: sentiment-analysis-model
version: 1.0.0
status: production
"#;
let asset = importer.import(yaml).unwrap();
assert_eq!(asset.name, "sentiment-analysis-model");Trait Implementations§
Auto Trait Implementations§
impl Freeze for CADSImporter
impl RefUnwindSafe for CADSImporter
impl Send for CADSImporter
impl Sync for CADSImporter
impl Unpin for CADSImporter
impl UnwindSafe for CADSImporter
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