pub struct PredicateArena { /* private fields */ }Expand description
Compact predicate storage with index-based edges.
Implementations§
Source§impl PredicateArena
impl PredicateArena
pub fn empty() -> PredicateArena
pub fn from_condition(condition: Condition) -> PredicateArena
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 = PredicateArena>) -> PredicateArena
pub fn all(arenas: impl IntoIterator<Item = PredicateArena>) -> PredicateArena
Combines independent predicates with AND.
Sourcepub fn any(arenas: impl IntoIterator<Item = PredicateArena>) -> PredicateArena
pub fn any(arenas: impl IntoIterator<Item = PredicateArena>) -> PredicateArena
Combines independent predicates with OR.
Sourcepub fn partition(&self) -> Result<(PredicateArena, PredicateArena), ParamError>
pub fn partition(&self) -> Result<(PredicateArena, PredicateArena), ParamError>
Splits an AND-separable tree into WHERE and HAVING trees.
Sourcepub fn without_field(&self, field: FieldId) -> PredicateArena
pub fn without_field(&self, field: FieldId) -> PredicateArena
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§fn clone(&self) -> PredicateArena
fn clone(&self) -> PredicateArena
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PredicateArena
impl Debug for PredicateArena
Source§impl Default for PredicateArena
impl Default for PredicateArena
Source§fn default() -> PredicateArena
fn default() -> PredicateArena
Returns the “default value” for a type. Read more
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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