pub struct PatternBuilder { /* private fields */ }Expand description
Builder for creating path patterns with a fluent API.
Implementations§
Source§impl PatternBuilder
impl PatternBuilder
Sourcepub fn out(self, edge_type: impl Into<EdgeType>) -> Self
pub fn out(self, edge_type: impl Into<EdgeType>) -> Self
Add an outgoing edge of the specified type.
Sourcepub fn inc(self, edge_type: impl Into<EdgeType>) -> Self
pub fn inc(self, edge_type: impl Into<EdgeType>) -> Self
Add an incoming edge of the specified type.
Sourcepub fn rel(self, edge_type: impl Into<EdgeType>) -> Self
pub fn rel(self, edge_type: impl Into<EdgeType>) -> Self
Add a bidirectional edge of the specified type.
Sourcepub fn out_var(
self,
edge_type: impl Into<EdgeType>,
min: usize,
max: usize,
) -> Self
pub fn out_var( self, edge_type: impl Into<EdgeType>, min: usize, max: usize, ) -> Self
Add a variable-length outgoing path.
Sourcepub fn in_var(
self,
edge_type: impl Into<EdgeType>,
min: usize,
max: usize,
) -> Self
pub fn in_var( self, edge_type: impl Into<EdgeType>, min: usize, max: usize, ) -> Self
Add a variable-length incoming path.
Sourcepub fn with_cycles(self) -> Self
pub fn with_cycles(self) -> Self
Allow cycles in matches.
Sourcepub fn build(self) -> PathPattern
pub fn build(self) -> PathPattern
Build the pattern.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PatternBuilder
impl RefUnwindSafe for PatternBuilder
impl Send for PatternBuilder
impl Sync for PatternBuilder
impl Unpin for PatternBuilder
impl UnsafeUnpin for PatternBuilder
impl UnwindSafe for PatternBuilder
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