pub struct WorldStateQuery {
pub node_types: Option<HashSet<NodeType>>,
pub layers: Option<HashSet<StateLayer>>,
pub node_ids: Option<HashSet<String>>,
pub relationship_types: Option<HashSet<String>>,
pub include_edges: bool,
pub max_depth: Option<usize>,
}Expand description
Query for filtering world state
Fields§
§node_types: Option<HashSet<NodeType>>Filter by node types
layers: Option<HashSet<StateLayer>>Filter by layers
node_ids: Option<HashSet<String>>Filter by node IDs
relationship_types: Option<HashSet<String>>Filter by relationship types
include_edges: boolInclude edges in results
max_depth: Option<usize>Maximum depth for traversal (for graph queries)
Implementations§
Source§impl WorldStateQuery
impl WorldStateQuery
Sourcepub fn with_node_types(self, types: HashSet<NodeType>) -> Self
pub fn with_node_types(self, types: HashSet<NodeType>) -> Self
Filter by node types
Sourcepub fn with_layers(self, layers: HashSet<StateLayer>) -> Self
pub fn with_layers(self, layers: HashSet<StateLayer>) -> Self
Filter by layers
Sourcepub fn with_node_ids(self, ids: HashSet<String>) -> Self
pub fn with_node_ids(self, ids: HashSet<String>) -> Self
Filter by node IDs
Sourcepub fn with_relationship_types(self, types: HashSet<String>) -> Self
pub fn with_relationship_types(self, types: HashSet<String>) -> Self
Filter by relationship types
Sourcepub fn include_edges(self, include: bool) -> Self
pub fn include_edges(self, include: bool) -> Self
Set whether to include edges
Sourcepub fn with_max_depth(self, depth: usize) -> Self
pub fn with_max_depth(self, depth: usize) -> Self
Set maximum traversal depth
Sourcepub fn matches_node(&self, node: &StateNode) -> bool
pub fn matches_node(&self, node: &StateNode) -> bool
Check if a node matches this query
Sourcepub fn matches_edge(&self, edge: &StateEdge) -> bool
pub fn matches_edge(&self, edge: &StateEdge) -> bool
Check if an edge matches this query
Trait Implementations§
Source§impl Clone for WorldStateQuery
impl Clone for WorldStateQuery
Source§fn clone(&self) -> WorldStateQuery
fn clone(&self) -> WorldStateQuery
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 moreSource§impl Debug for WorldStateQuery
impl Debug for WorldStateQuery
Source§impl Default for WorldStateQuery
impl Default for WorldStateQuery
Source§impl<'de> Deserialize<'de> for WorldStateQuery
impl<'de> Deserialize<'de> for WorldStateQuery
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for WorldStateQuery
impl RefUnwindSafe for WorldStateQuery
impl Send for WorldStateQuery
impl Sync for WorldStateQuery
impl Unpin for WorldStateQuery
impl UnwindSafe for WorldStateQuery
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