Skip to main content

ConvexGraphStore

Struct ConvexGraphStore 

Source
pub struct ConvexGraphStore<C> { /* private fields */ }

Implementations§

Source§

impl<C> ConvexGraphStore<C>

Source

pub fn new(client: C) -> Self

Source

pub fn client(&self) -> &C

Source

pub fn into_inner(self) -> C

Trait Implementations§

Source§

impl<C: ConvexGraphClient> GraphStore for ConvexGraphStore<C>

Source§

fn upsert_node(&self, node: &GraphNode) -> Result<()>

Source§

fn upsert_edge(&self, edge: &GraphEdge) -> Result<()>

Source§

fn delete_node(&self, id: &str) -> Result<usize>

Source§

fn delete_edge(&self, from_id: &str, to_id: &str, kind: &str) -> Result<usize>

Source§

fn node(&self, id: &str) -> Result<Option<GraphNode>>

Source§

fn all_nodes(&self) -> Result<Vec<GraphNode>>

Source§

fn all_edges(&self) -> Result<Vec<GraphEdge>>

Source§

fn graph_counts(&self) -> Result<(usize, usize)>

Source§

fn nodes_by_kind(&self, kind: &str) -> Result<Vec<GraphNode>>

Source§

fn outgoing_edges( &self, from_id: &str, kind: Option<&str>, ) -> Result<Vec<GraphEdge>>

Source§

fn shortest_path( &self, from_id: &str, to_id: &str, kind: Option<&str>, ) -> Result<Option<GraphPath>>

Source§

fn edge(&self, edge_id: &str) -> Result<Option<GraphEdge>>

Source§

fn sample_edge(&self, kind: Option<&str>) -> Result<Option<GraphEdge>>

Source§

fn sample_edge_with_property( &self, ) -> Result<Option<(GraphEdge, GraphPropertyFilter)>>

Source§

fn incident_edges( &self, node_id: &str, kind: Option<&str>, ) -> Result<Vec<GraphEdge>>

Source§

fn paged_edges( &self, kind: Option<&str>, options: GraphQueryOptions, ) -> Result<GraphPagedSubgraph>

Source§

fn paged_incident_edges( &self, node_id: &str, kind: Option<&str>, options: GraphQueryOptions, ) -> Result<GraphPagedSubgraph>

Source§

fn edges_between_nodes( &self, node_ids: &BTreeSet<String>, ) -> Result<Vec<GraphEdge>>

Source§

fn shortest_path_with_max_hops( &self, from_id: &str, to_id: &str, kind: Option<&str>, max_hops: Option<usize>, ) -> Result<Option<GraphPath>>

Source§

fn neighborhood( &self, center_id: &str, depth: usize, kind: Option<&str>, ) -> Result<Option<GraphSubgraph>>

Source§

fn paged_nodes_by_kind( &self, kind: &str, options: GraphQueryOptions, ) -> Result<GraphPagedSubgraph>

Source§

fn paged_neighborhood( &self, center_id: &str, depth: usize, kind: Option<&str>, options: GraphQueryOptions, ) -> Result<Option<GraphPagedSubgraph>>

Source§

fn ranked_neighborhood( &self, center_id: &str, options: &RankedNeighborhoodOptions, ) -> Result<Option<RankedNeighborhoodResult>>

Source§

fn reachable_nodes_by_kind( &self, from_id: &str, kind: &str, depth: usize, limit: usize, ) -> Result<Vec<(GraphNode, GraphPath)>>

Source§

fn reachable_nodes_by_kinds( &self, from_id: &str, kinds: &[&str], depth: usize, limit: usize, ) -> Result<BTreeMap<String, Vec<(GraphNode, GraphPath)>>>

Source§

fn resolve_evidence_target( &self, target: &str, kinds: &[&str], ) -> Result<Option<GraphNode>>

Auto Trait Implementations§

§

impl<C> Freeze for ConvexGraphStore<C>
where C: Freeze,

§

impl<C> RefUnwindSafe for ConvexGraphStore<C>
where C: RefUnwindSafe,

§

impl<C> Send for ConvexGraphStore<C>
where C: Send,

§

impl<C> Sync for ConvexGraphStore<C>
where C: Sync,

§

impl<C> Unpin for ConvexGraphStore<C>
where C: Unpin,

§

impl<C> UnsafeUnpin for ConvexGraphStore<C>
where C: UnsafeUnpin,

§

impl<C> UnwindSafe for ConvexGraphStore<C>
where C: UnwindSafe,

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.