cellular_raza_building_blocks/cell_building_blocks/
cycle.rs1use cellular_raza_concepts::*;
2use serde::{Deserialize, Serialize};
5
6#[cfg(feature = "pyo3")]
7use pyo3::prelude::*;
8
9#[derive(Clone, Debug, Serialize, Deserialize)]
11#[cfg_attr(feature = "pyo3", pyclass(from_py_object))]
12pub struct NoCycle;
13
14impl<Cel, Float> Cycle<Cel, Float> for NoCycle {
15 fn update_cycle(_: &mut rand_chacha::ChaCha8Rng, _: &Float, _: &mut Cel) -> Option<CycleEvent> {
16 None
17 }
18
19 fn divide(_: &mut rand_chacha::ChaCha8Rng, _: &mut Cel) -> Result<Cel, DivisionError> {
20 panic!(
21 "This is the divide() function of the NoCycle struct which should never be called. This is a backend error. Please report!"
22 )
23 }
24}