pub struct GraphState { /* private fields */ }Implementations§
Source§impl GraphState
impl GraphState
pub fn new() -> Self
pub fn add_node(&mut self, node: GraphNode)
pub fn add_edge(&mut self, edge: GraphEdge)
pub fn get_nodes(&self) -> Vec<GraphNode>
pub fn get_edges(&self) -> Vec<GraphEdge>
pub fn get_node(&self, id: &str) -> Option<&GraphNode>
pub fn search_nodes(&self, query: &str, limit: usize) -> Vec<GraphNode>
pub fn shortest_path(&self, source: &str, target: &str) -> Option<Vec<String>>
pub fn node_count(&self) -> usize
pub fn edge_count(&self) -> usize
Trait Implementations§
Source§impl Default for GraphState
impl Default for GraphState
Source§fn default() -> GraphState
fn default() -> GraphState
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for GraphState
impl RefUnwindSafe for GraphState
impl Send for GraphState
impl Sync for GraphState
impl Unpin for GraphState
impl UnsafeUnpin for GraphState
impl UnwindSafe for GraphState
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request