pub struct DisjunctionParser;Expand description
Parser for OR patterns in queries
Implementations§
Source§impl DisjunctionParser
impl DisjunctionParser
Sourcepub fn parse(pattern: &str) -> Option<Disjunction>
pub fn parse(pattern: &str) -> Option<Disjunction>
Parse a pattern that might contain OR
Examples:
- “(A OR B)” -> Disjunction with 2 branches
- “(A OR B OR C)” -> Disjunction with 3 branches
- “A” -> None (no OR, single goal)
Sourcepub fn contains_or(pattern: &str) -> bool
pub fn contains_or(pattern: &str) -> bool
Check if a pattern contains OR
Auto Trait Implementations§
impl Freeze for DisjunctionParser
impl RefUnwindSafe for DisjunctionParser
impl Send for DisjunctionParser
impl Sync for DisjunctionParser
impl Unpin for DisjunctionParser
impl UnwindSafe for DisjunctionParser
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more