Skip to main content

EmbeddedClient

Struct EmbeddedClient 

Source
pub struct EmbeddedClient { /* private fields */ }
Expand description

In-process client that wraps a GraphStore directly.

No network overhead — queries execute in the same process. Ideal for examples, tests, and embedded applications.

Implementations§

Source§

impl EmbeddedClient

Source

pub fn new() -> Self

Create a new EmbeddedClient with a fresh empty graph store

Source

pub fn with_store(store: Arc<RwLock<GraphStore>>) -> Self

Create an EmbeddedClient wrapping an existing store

Source

pub fn store(&self) -> &Arc<RwLock<GraphStore>>

Get a reference to the underlying store (for direct graph manipulation)

Source

pub async fn store_read(&self) -> RwLockReadGuard<'_, GraphStore>

Acquire a read lock on the store.

Use for direct read-only access to graph data (node/edge lookups, iterations).

Source

pub async fn store_write(&self) -> RwLockWriteGuard<'_, GraphStore>

Acquire a write lock on the store.

Use for direct mutation (create_node, set_property, etc.).

Source

pub fn nlq_pipeline(&self, config: NLQConfig) -> Result<NLQPipeline, NLQError>

Create an NLQ pipeline for natural language → Cypher translation.

Source

pub fn agent_runtime(&self, config: AgentConfig) -> AgentRuntime

Create an agent runtime for agentic enrichment workflows.

Source

pub fn persistence_manager( &self, base_path: impl AsRef<Path>, ) -> Result<PersistenceManager, PersistenceError>

Create a persistence manager for durable storage.

Source

pub fn cache_stats(&self) -> &CacheStats

Return AST cache statistics (hits, misses).

Source

pub async fn export_snapshot( &self, _tenant: &str, path: &Path, ) -> Result<ExportStats, Box<dyn Error>>

Export a snapshot of the current graph store to a file.

Source

pub async fn import_snapshot( &self, _tenant: &str, path: &Path, ) -> Result<ImportStats, Box<dyn Error>>

Import a snapshot into the current graph store from a file.

Trait Implementations§

Source§

impl AlgorithmClient for EmbeddedClient

Source§

fn build_view<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, label: Option<&'life1 str>, edge_type: Option<&'life2 str>, weight_prop: Option<&'life3 str>, ) -> Pin<Box<dyn Future<Output = GraphView> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Build a GraphView projection for algorithm execution. Read more
Source§

fn page_rank<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, config: PageRankConfig, label: Option<&'life1 str>, edge_type: Option<&'life2 str>, ) -> Pin<Box<dyn Future<Output = HashMap<u64, f64>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Run PageRank on the graph (or a subgraph filtered by label/edge_type).
Source§

fn weakly_connected_components<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, label: Option<&'life1 str>, edge_type: Option<&'life2 str>, ) -> Pin<Box<dyn Future<Output = WccResult> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Detect weakly connected components.
Source§

fn strongly_connected_components<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, label: Option<&'life1 str>, edge_type: Option<&'life2 str>, ) -> Pin<Box<dyn Future<Output = SccResult> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Detect strongly connected components.
Source§

fn bfs<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, source: u64, target: u64, label: Option<&'life1 str>, edge_type: Option<&'life2 str>, ) -> Pin<Box<dyn Future<Output = Option<PathResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Breadth-first search from source to target.
Source§

fn dijkstra<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, source: u64, target: u64, label: Option<&'life1 str>, edge_type: Option<&'life2 str>, weight_prop: Option<&'life3 str>, ) -> Pin<Box<dyn Future<Output = Option<PathResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Dijkstra’s shortest path from source to target (weighted).
Source§

fn edmonds_karp<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, source: u64, sink: u64, label: Option<&'life1 str>, edge_type: Option<&'life2 str>, ) -> Pin<Box<dyn Future<Output = Option<FlowResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Edmonds-Karp maximum flow from source to sink.
Source§

fn prim_mst<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, label: Option<&'life1 str>, edge_type: Option<&'life2 str>, weight_prop: Option<&'life3 str>, ) -> Pin<Box<dyn Future<Output = MSTResult> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Prim’s minimum spanning tree.
Source§

fn count_triangles<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, label: Option<&'life1 str>, edge_type: Option<&'life2 str>, ) -> Pin<Box<dyn Future<Output = usize> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Count triangles in the graph.
Source§

fn bfs_all_shortest_paths<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, source: u64, target: u64, label: Option<&'life1 str>, edge_type: Option<&'life2 str>, ) -> Pin<Box<dyn Future<Output = Vec<PathResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Find all shortest paths between source and target (BFS).
Source§

fn cdlp<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, config: CdlpConfig, label: Option<&'life1 str>, edge_type: Option<&'life2 str>, ) -> Pin<Box<dyn Future<Output = CdlpResult> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Community Detection via Label Propagation (CDLP).
Source§

fn local_clustering_coefficient<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, label: Option<&'life1 str>, edge_type: Option<&'life2 str>, ) -> Pin<Box<dyn Future<Output = LccResult> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Local Clustering Coefficient for all nodes.
Source§

fn pca<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, label: Option<&'life1 str>, properties: &'life2 [&'life3 str], config: PcaConfig, ) -> Pin<Box<dyn Future<Output = PcaResult> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Principal Component Analysis on node numeric properties. Read more
Source§

impl Default for EmbeddedClient

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl GraphmindClient for EmbeddedClient

Source§

fn query<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, graph: &'life1 str, cypher: &'life2 str, ) -> Pin<Box<dyn Future<Output = GraphmindResult<QueryResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Execute a read-write Cypher query
Source§

fn query_with_params<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, graph: &'life1 str, cypher: &'life2 str, params: HashMap<String, Value>, ) -> Pin<Box<dyn Future<Output = GraphmindResult<QueryResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Execute a read-write Cypher query with parameters
Source§

fn query_readonly<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _graph: &'life1 str, cypher: &'life2 str, ) -> Pin<Box<dyn Future<Output = GraphmindResult<QueryResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Execute a read-only Cypher query
Source§

fn delete_graph<'life0, 'life1, 'async_trait>( &'life0 self, _graph: &'life1 str, ) -> Pin<Box<dyn Future<Output = GraphmindResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Delete a graph
Source§

fn list_graphs<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = GraphmindResult<Vec<String>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

List all graphs
Source§

fn status<'life0, 'life1, 'async_trait>( &'life0 self, _graph: &'life1 str, ) -> Pin<Box<dyn Future<Output = GraphmindResult<ServerStatus>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get server status for a specific graph
Source§

fn ping<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = GraphmindResult<String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Ping the server
Source§

fn schema<'life0, 'life1, 'async_trait>( &'life0 self, _graph: &'life1 str, ) -> Pin<Box<dyn Future<Output = GraphmindResult<String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Return a schema summary (node types, edge types, counts)
Source§

fn explain<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _graph: &'life1 str, cypher: &'life2 str, ) -> Pin<Box<dyn Future<Output = GraphmindResult<QueryResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Return the EXPLAIN plan for a Cypher query without executing it
Source§

fn profile<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _graph: &'life1 str, cypher: &'life2 str, ) -> Pin<Box<dyn Future<Output = GraphmindResult<QueryResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Execute a Cypher query with PROFILE instrumentation
Source§

impl VectorClient for EmbeddedClient

Source§

fn create_vector_index<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, label: &'life1 str, property: &'life2 str, dimensions: usize, metric: DistanceMetric, ) -> Pin<Box<dyn Future<Output = GraphmindResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Create a vector index for a given label and property.
Source§

fn add_vector<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, label: &'life1 str, property: &'life2 str, node_id: NodeId, vector: &'life3 [f32], ) -> Pin<Box<dyn Future<Output = GraphmindResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Add a vector to the index for a given node.
Search for the k nearest neighbors to a query vector.

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

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

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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.
Source§

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

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> OptionalSend for T
where T: Send + ?Sized,

Source§

impl<T> OptionalSync for T
where T: Sync + ?Sized,