pub struct GraphQuery {
pub start_nodes: Vec<String>,
pub relationships: Vec<String>,
pub max_depth: usize,
pub limit: usize,
}Expand description
Query for graph traversal.
Fields§
§start_nodes: Vec<String>Starting node ID(s).
relationships: Vec<String>Relationship types to traverse (empty = all).
max_depth: usizeMaximum traversal depth.
limit: usizeMaximum results to return.
Implementations§
Source§impl GraphQuery
impl GraphQuery
Sourcepub fn from_node(id: impl Into<String>) -> Self
pub fn from_node(id: impl Into<String>) -> Self
Creates a new graph query starting from a single node.
Sourcepub fn with_relationships(self, rels: Vec<String>) -> Self
pub fn with_relationships(self, rels: Vec<String>) -> Self
Sets the relationships to traverse.
Sourcepub fn with_max_depth(self, depth: usize) -> Self
pub fn with_max_depth(self, depth: usize) -> Self
Sets the maximum depth.
Sourcepub fn with_limit(self, limit: usize) -> Self
pub fn with_limit(self, limit: usize) -> Self
Sets the result limit.
Trait Implementations§
Source§impl Clone for GraphQuery
impl Clone for GraphQuery
Source§fn clone(&self) -> GraphQuery
fn clone(&self) -> GraphQuery
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for GraphQuery
impl RefUnwindSafe for GraphQuery
impl Send for GraphQuery
impl Sync for GraphQuery
impl Unpin for GraphQuery
impl UnwindSafe for GraphQuery
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