datalog_structural_model/position/
rule_site.rs1use std::fmt;
4
5use super::head_path::HeadAtomPath;
6use super::literal_path::LiteralPath;
7
8#[derive(
10 Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd, serde::Serialize, serde::Deserialize,
11)]
12#[serde(deny_unknown_fields)]
13pub enum RuleSite {
14 Head(HeadAtomPath),
16 Body(LiteralPath),
18}
19
20impl fmt::Display for RuleSite {
21 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
22 match self {
23 Self::Head(path) => path.fmt(f),
24 Self::Body(path) => path.fmt(f),
25 }
26 }
27}