pub struct InlineRange { /* private fields */ }Expand description
Restricts a variable’s raw value to a byte-lexicographic range.
This constraint only confirms — it never proposes candidates.
Use it with and! alongside a constraint that does
propose (e.g. a pattern!):
ⓘ
find!((id: Id, ts: Inline<NsTAIInterval>),
and!(
pattern!(data, [{ ?id @ exec::requested_at: ?ts }]),
value_range(ts, min_ts, max_ts),
)
)The estimate returns usize::MAX so the intersection sorts this
constraint last — the tighter TribleSet constraint proposes first,
then this range constraint filters.
Implementations§
Source§impl InlineRange
impl InlineRange
Trait Implementations§
Source§impl<'a> Constraint<'a> for InlineRange
impl<'a> Constraint<'a> for InlineRange
Source§fn estimate(&self, variable: VariableId, _binding: &Binding) -> Option<usize>
fn estimate(&self, variable: VariableId, _binding: &Binding) -> Option<usize>
Returns usize::MAX so the intersection never chooses this
constraint as the proposer — it only confirms.
Source§fn propose(
&self,
_variable: VariableId,
_binding: &Binding,
_proposals: &mut Vec<RawInline>,
)
fn propose( &self, _variable: VariableId, _binding: &Binding, _proposals: &mut Vec<RawInline>, )
Does not propose — the paired TribleSet constraint handles proposals.
Source§fn confirm(
&self,
variable: VariableId,
_binding: &Binding,
proposals: &mut Vec<RawInline>,
)
fn confirm( &self, variable: VariableId, _binding: &Binding, proposals: &mut Vec<RawInline>, )
Retains only proposals whose raw bytes fall within [min, max] inclusive.
Source§fn satisfied(&self, binding: &Binding) -> bool
fn satisfied(&self, binding: &Binding) -> bool
Returns false when the variable is bound to a value outside the range.
Source§fn variables(&self) -> VariableSet
fn variables(&self) -> VariableSet
Returns the set of variables this constraint touches. Read more
Source§fn influence(&self, variable: VariableId) -> VariableSet
fn influence(&self, variable: VariableId) -> VariableSet
Returns the set of variables whose estimates may change when
variable is bound or unbound. Read moreAuto Trait Implementations§
impl Freeze for InlineRange
impl RefUnwindSafe for InlineRange
impl Send for InlineRange
impl Sync for InlineRange
impl Unpin for InlineRange
impl UnsafeUnpin for InlineRange
impl UnwindSafe for InlineRange
Blanket Implementations§
impl<T> ArchiveOwner for T
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 moreSource§impl<S, T> IntoEncoded<S> for Twhere
S: Encodes<T>,
impl<S, T> IntoEncoded<S> for Twhere
S: Encodes<T>,
Source§fn into_encoded(self) -> <T as IntoEncoded<S>>::Output
fn into_encoded(self) -> <T as IntoEncoded<S>>::Output
Run the conversion.