ligen_ir/function/
synchrony.rs

1use std::fmt::Display;
2
3use crate::prelude::*;
4
5/// Synchrony structure.
6#[derive(Debug, PartialEq, Copy, Clone, Serialize, Deserialize, EnumIter)]
7pub enum Synchrony {
8    Synchronous,
9    Asynchronous
10}
11
12impl Default for Synchrony {
13    fn default() -> Self {
14        Self::Synchronous
15    }
16}
17
18impl Display for Synchrony {
19    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
20        match self {
21            Synchrony::Synchronous => write!(f, "Synchronous"),
22            Synchrony::Asynchronous => write!(f, "Asynchronous")
23        }
24    }
25}