pub struct PredicateArena { /* private fields */ }Expand description
Compact predicate storage with index-based edges.
Implementations§
Source§impl PredicateArena
impl PredicateArena
pub fn empty() -> Self
pub fn from_condition(condition: Condition) -> Self
pub fn nodes(&self) -> &[PredicateNode]
pub const fn root(&self) -> Option<NodeId>
pub fn node(&self, id: NodeId) -> Option<&PredicateNode>
Sourcepub fn all(arenas: impl IntoIterator<Item = Self>) -> Self
pub fn all(arenas: impl IntoIterator<Item = Self>) -> Self
Combines independent predicates with AND.
Sourcepub fn any(arenas: impl IntoIterator<Item = Self>) -> Self
pub fn any(arenas: impl IntoIterator<Item = Self>) -> Self
Combines independent predicates with OR.
Sourcepub fn partition(&self) -> Result<(Self, Self), ParamError>
pub fn partition(&self) -> Result<(Self, Self), ParamError>
Splits an AND-separable tree into WHERE and HAVING trees.
Sourcepub fn without_field(&self, field: FieldId) -> Self
pub fn without_field(&self, field: FieldId) -> Self
Returns a predicate with conditions on field removed.
This is used by facet self-exclusion. The remaining boolean tree keeps its original shape; a branch that contains only the excluded field is treated as an empty branch so the facet can evaluate the rest of the query without accidentally broadening the server-owned predicates.
Trait Implementations§
Source§impl Clone for PredicateArena
impl Clone for PredicateArena
Source§impl Debug for PredicateArena
impl Debug for PredicateArena
Source§impl Default for PredicateArena
impl Default for PredicateArena
Source§impl PartialEq for PredicateArena
impl PartialEq for PredicateArena
impl StructuralPartialEq for PredicateArena
Auto Trait Implementations§
impl Freeze for PredicateArena
impl RefUnwindSafe for PredicateArena
impl Send for PredicateArena
impl Sync for PredicateArena
impl Unpin for PredicateArena
impl UnsafeUnpin for PredicateArena
impl UnwindSafe for PredicateArena
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