pub enum Path {
Id,
Pred(NamedNode),
Inverse(Box<Path>),
Seq(Vec<Path>),
Alt(Vec<Path>),
Star(Box<Path>),
}Variants§
Id
id — the identity relation / empty word.
Pred(NamedNode)
q — a single predicate step.
Inverse(Box<Path>)
π⁻ — inverse.
Seq(Vec<Path>)
π · π′ · … — sequential composition.
Alt(Vec<Path>)
π ∪ π′ ∪ … — alternation (relational union).
Star(Box<Path>)
π* — reflexive-transitive closure.
Implementations§
Source§impl Path
impl Path
Sourcepub fn seq(parts: Vec<Path>) -> Path
pub fn seq(parts: Vec<Path>) -> Path
Compose paths, flattening nested Seq and dropping id (the unit of
composition, π · id = π). An empty sequence is id.
Sourcepub fn alt(parts: Vec<Path>) -> Path
pub fn alt(parts: Vec<Path>) -> Path
Alternate paths, flattening nested Alt. An empty alternation is the
empty relation (kept explicit as Alt([]) — it matches nothing).
Sourcepub fn one_or_more(self) -> Path
pub fn one_or_more(self) -> Path
π⁺ = π · π* — one-or-more sugar (gap-analysis P1).
Sourcepub fn zero_or_one(self) -> Path
pub fn zero_or_one(self) -> Path
π? = π ∪ id — zero-or-one sugar (gap-analysis P1).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Path
impl<'de> Deserialize<'de> for Path
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Path
impl StructuralPartialEq for Path
Auto Trait Implementations§
impl Freeze for Path
impl RefUnwindSafe for Path
impl Send for Path
impl Sync for Path
impl Unpin for Path
impl UnsafeUnpin for Path
impl UnwindSafe for Path
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more