Skip to main content

GByteFilter

Enum GByteFilter 

Source
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

§allow: bool

true = allow-list (keep members); false = block-list (drop members).

§named: StrHashSet

Named-node graphs by IRI hash (identity lookup, no second SipHash).

§default_graph: bool

Whether the RDF default graph participates in the window.

§extras: Vec<Vec<u8>>

Blank-node (and any non-named) graph terms as encoded byte strings.

Implementations§

Source§

impl GByteFilter

Source

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).

Source

pub fn empty_window(&self) -> bool

true for GByteFilter::EmptyWindow (no row can pass).

Source

pub fn unconstrained(&self) -> bool

true for GByteFilter::Unconstrained (no row is filtered).

Source

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.

Source

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

Source§

fn clone(&self) -> GByteFilter

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for GByteFilter

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,