pub enum GByteFilter {
Unconstrained,
EmptyWindow,
Window {
allow: bool,
named: StrHashSet,
default_graph: bool,
extras: Vec<Vec<u8>>,
},
}Expand description
Byte-level residual graph-membership window (twin of the old decoded-term
GraphMembership).
Compiled once per scan from the request’s graph-filter terms and polarity; evaluated per row on the raw graph segment (empty = default graph).
Variants§
Unconstrained
Empty block-list: no graph constraint at all.
EmptyWindow
Empty allow-list: no graph can match; the scan is trivially empty.
Window
Constrained window over named IRIs, the default graph, and other (blank / literal) graph terms compared as full encoded slices.
Fields
named: StrHashSetNamed-node graphs by IRI hash (identity lookup, no second SipHash).
Implementations§
Source§impl GByteFilter
impl GByteFilter
Sourcepub fn compile(terms: &[EncodedTerm], allow: bool) -> Self
pub fn compile(terms: &[EncodedTerm], allow: bool) -> Self
Compile the byte-level window from graph-filter terms and polarity.
Empty terms: allow = false is GByteFilter::Unconstrained (a
block-list that blocks nothing), allow = true is
GByteFilter::EmptyWindow (an allow-list that allows nothing).
Sourcepub fn empty_window(&self) -> bool
pub fn empty_window(&self) -> bool
true for GByteFilter::EmptyWindow (no row can pass).
Sourcepub fn unconstrained(&self) -> bool
pub fn unconstrained(&self) -> bool
true for GByteFilter::Unconstrained (no row is filtered).
Sourcepub fn keeps_segment(&self, graph: &[u8]) -> bool
pub fn keeps_segment(&self, graph: &[u8]) -> bool
Membership on a raw graph segment (empty = default graph).
Segments are width-walked before this runs, so a named-node segment is
exactly 1 ‖ 16 hash bytes.
Sourcepub fn keeps_term(&self, graph: &EncodedTerm) -> bool
pub fn keeps_term(&self, graph: &EncodedTerm) -> bool
Membership on a decoded graph term (unary paths that already decoded).
Trait Implementations§
Source§impl Clone for GByteFilter
impl Clone for GByteFilter
Source§fn clone(&self) -> GByteFilter
fn clone(&self) -> GByteFilter
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more