🎉 Implement boolean operations (wasm)

This commit is contained in:
Belén Albeza 2025-01-09 12:21:05 +01:00
parent 1514faca55
commit 4e5f67676c
8 changed files with 126 additions and 16 deletions

View file

@ -0,0 +1,25 @@
#[derive(Debug, Clone, Copy, PartialEq)]
pub enum BoolType {
Union,
Difference,
Intersection,
Exclusion,
}
impl From<u8> for BoolType {
fn from(value: u8) -> Self {
match value {
0 => Self::Union,
1 => Self::Difference,
2 => Self::Intersection,
3 => Self::Exclusion,
_ => Self::default(),
}
}
}
impl Default for BoolType {
fn default() -> Self {
Self::Union
}
}