MatchQuery

Struct MatchQuery 

Source
pub struct MatchQuery<'a> { /* private fields */ }
Expand description

Builder pattern for configuring subgraph matching queries.

This provides a fluent API for setting options and collecting results.

Implementations§

Source§

impl<'a> MatchQuery<'a>

Source

pub fn new(pattern: &'a Graph, target: &'a Graph) -> Self

Create a new match query with default options.

Source

pub fn with_options(self, opts: VF3Options) -> Self

Configure the matching options.

Source

pub fn node_induced(self) -> Self

Set node-induced matching (default).

Source

pub fn edge_induced(self) -> Self

Set edge-induced matching.

Source

pub fn undirected(self) -> Self

Treat graphs as undirected.

Source

pub fn with_node_labels(self) -> Self

Enable node label checking.

Source

pub fn with_edge_labels(self) -> Self

Enable edge label checking.

Source

pub fn limit(self, max: usize) -> Self

Limit the maximum number of matches to find.

Source

pub fn collect(self) -> Vec<NodeMapping>

Collect all matches (up to the limit if set).

Source

pub fn count(self) -> usize

Count the total number of matches.

Source

pub fn first(self) -> Option<NodeMapping>

Find the first match, if any.

Source

pub fn exists(self) -> bool

Check if any match exists (subgraph isomorphism test).

Source

pub fn iter(self) -> LazyDfsIter<'a>

Create an iterator over all matches.

Source

pub fn prepared(self) -> Prepared<'a>

Use prepared search for better performance with repeated queries.

Auto Trait Implementations§

§

impl<'a> Freeze for MatchQuery<'a>

§

impl<'a> RefUnwindSafe for MatchQuery<'a>

§

impl<'a> Send for MatchQuery<'a>

§

impl<'a> Sync for MatchQuery<'a>

§

impl<'a> Unpin for MatchQuery<'a>

§

impl<'a> UnwindSafe for MatchQuery<'a>

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