datex-core 0.0.14

The DATEX Core Rust implementation
Documentation
use core::time::Duration;

use crate::{
    core_compiler::{
        to_instructions::ToInstructions, value_visitor::ValueVisitor,
    },
    prelude::*,
    runtime::cache::shared_references_cache::SharedReferencesCache,
};
// impl IntoRegularInstruction for Instant {
//     fn into_regular_instruction(&self) -> RegularInstruction {
//         // TODO: Implement the conversion from Instant to RegularInstruction
//         unimplemented!()
//     }
// }

impl ToInstructions for Duration {
    fn to_instructions<'a>(
        &'a self,
        _ctx: &'a mut dyn ValueVisitor,
        _cache: &'a mut SharedReferencesCache,
    ) -> Box<dyn Iterator<Item = crate::instruction::Instruction> + 'a> {
        Box::new(gen move { todo!() })
    }
}
// impl ToInstructionsDyn for Duration {
//     fn to_instructions_dyn<'a, 'ctx>(
//         &'a self,
//         ctx: &'a mut (dyn ValueVisitor + 'ctx),
//     ) -> Box<dyn Iterator<Item = crate::instruction::CompileItem> + 'a>
//     where
//         'ctx: 'a,
//     {
//         Box::new(self.to_instructions(ctx))
//     }
// }