pub trait Symbolic: Identifiable {
type Repr;
// Required method
fn symbol(&self) -> &Self::Repr;
}Expand description
Represents a symbolic, logical, or linguistic identity.
This trait allows integration of abstract knowledge representations into a unified context system—such as:
- Atoms (
"A") - Named terms (
goal(X)) - Logical constructs (
∀x.P(x) → Q(x))
The Repr type is intentionally generic to support structured representations:
enums, trees, strings, or AST nodes.
§Example
use deep_causality::{Identifiable, Symbolic};
struct RuleNode { id: u64, term: String }
impl Identifiable for RuleNode {fn id(&self) -> u64 {
self.id
}}
impl Symbolic for RuleNode {
type Repr = String;
fn symbol(&self) -> &Self::Repr { &self.term }
}Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".