diff --git a/layouts/src/layout/sum.rs b/layouts/src/layout/sum.rs index 7d115b24..ae609c3d 100644 --- a/layouts/src/layout/sum.rs +++ b/layouts/src/layout/sum.rs @@ -5,9 +5,6 @@ use crate::{Dataset, Ref, ValueFormat}; use super::LayoutType; -pub mod deserialization; -pub mod serialization; - pub struct SumLayoutType; #[derive(Debug, Clone, Educe, serde::Serialize, serde::Deserialize)] diff --git a/layouts/src/layout/sum/deserialization.rs b/layouts/src/layout/sum/deserialization.rs deleted file mode 100644 index 86c3e11a..00000000 --- a/layouts/src/layout/sum/deserialization.rs +++ /dev/null @@ -1,42 +0,0 @@ -use std::collections::HashMap; - -use crate::utils::DetAutomaton; - -use super::SumLayout; - -impl SumLayout { - pub fn deserialization_discriminants(&self) -> Vec { - todo!() - } -} - -pub struct Discriminants(Vec); - -pub enum Discriminant { - Literal(LiteralDiscriminant), - Record(RecordDiscriminant), - List(ListDiscriminant), - Any, -} - -pub struct LiteralDiscriminant { - /// Automaton recognizing the literal value. - pub automaton: DetAutomaton, -} - -pub struct RecordDiscriminant { - pub fields: HashMap, -} - -pub enum ListDiscriminant { - Sized(SizedListDiscriminant), - UnsizedListDiscriminant(UnsizedListDiscriminant), -} - -pub struct SizedListDiscriminant { - pub items: Vec, -} - -pub struct UnsizedListDiscriminant { - pub item: Box, -} diff --git a/layouts/src/layout/sum/serialization.rs b/layouts/src/layout/sum/serialization.rs deleted file mode 100644 index 7eb75646..00000000 --- a/layouts/src/layout/sum/serialization.rs +++ /dev/null @@ -1,36 +0,0 @@ -use std::collections::HashMap; - -use crate::{graph::Dataset, utils::DetAutomaton}; - -use super::SumLayout; - -impl SumLayout { - pub fn serialization_discriminants(&self) -> Vec> { - todo!() - } -} - -pub type Discriminants = Vec>; - -pub struct Discriminant { - /// Variable bindings. - pub bindings: HashMap, - - /// Matching dataset. - pub dataset: Dataset, -} - -pub struct Constraints { - pub iri: IriConstraints, - pub literal: LiteralConstraints, -} - -pub struct IriConstraints { - /// Automaton recognizing the IRI representation of the resource. - pub automaton: Option>, -} - -pub struct LiteralConstraints { - /// Automaton recognizing the literal representation of the resource. - pub automaton: Option>, -}