pub struct TraversalService<G: SwhOptFullGraph + Clone + Send + Sync + 'static> {
pub statsd_client: Option<Arc<StatsdClient>>,
/* private fields */
}
Fields§
§statsd_client: Option<Arc<StatsdClient>>
Implementations§
Source§impl<G: SwhOptFullGraph + Clone + Send + Sync + 'static> TraversalService<G>
impl<G: SwhOptFullGraph + Clone + Send + Sync + 'static> TraversalService<G>
pub fn new(graph: G, statsd_client: Option<Arc<StatsdClient>>) -> Self
Trait Implementations§
Source§impl<G: SwhOptFullGraph + Send + Sync + Clone + 'static> TraversalService for TraversalService<G>
impl<G: SwhOptFullGraph + Send + Sync + Clone + 'static> TraversalService for TraversalService<G>
Source§type TraverseStream = ReceiverStream<Result<Node, Status>>
type TraverseStream = ReceiverStream<Result<Node, Status>>
Server streaming response type for the Traverse method.
Source§fn get_node<'life0, 'async_trait>(
&'life0 self,
request: Request<GetNodeRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Node>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_node<'life0, 'async_trait>(
&'life0 self,
request: Request<GetNodeRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Node>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
GetNode returns a single Node and its properties.
Source§fn traverse<'life0, 'async_trait>(
&'life0 self,
request: Request<TraversalRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::TraverseStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn traverse<'life0, 'async_trait>(
&'life0 self,
request: Request<TraversalRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::TraverseStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Traverse performs a breadth-first graph traversal from a set of source
nodes, then streams the nodes it encounters (if they match a given
return filter), along with their properties.
Source§fn find_path_to<'life0, 'async_trait>(
&'life0 self,
request: Request<FindPathToRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Path>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn find_path_to<'life0, 'async_trait>(
&'life0 self,
request: Request<FindPathToRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Path>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
FindPathTo searches for a shortest path between a set of source nodes
and a node that matches a specific criteria. Read more
Source§fn find_path_between<'life0, 'async_trait>(
&'life0 self,
request: Request<FindPathBetweenRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Path>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn find_path_between<'life0, 'async_trait>(
&'life0 self,
request: Request<FindPathBetweenRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Path>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
FindPathBetween searches for a shortest path between a set of source
nodes and a set of destination nodes. Read more
Source§fn count_nodes<'life0, 'async_trait>(
&'life0 self,
request: Request<TraversalRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<CountResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn count_nodes<'life0, 'async_trait>(
&'life0 self,
request: Request<TraversalRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<CountResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
CountNodes does the same as Traverse, but only returns the number of
nodes accessed during the traversal.
Source§fn count_edges<'life0, 'async_trait>(
&'life0 self,
request: Request<TraversalRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<CountResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn count_edges<'life0, 'async_trait>(
&'life0 self,
request: Request<TraversalRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<CountResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
CountEdges does the same as Traverse, but only returns the number of
edges accessed during the traversal.
Source§impl<G: SwhOptFullGraph + Clone + Send + Sync + 'static> TraversalServiceTrait for TraversalService<G>
impl<G: SwhOptFullGraph + Clone + Send + Sync + 'static> TraversalServiceTrait for TraversalService<G>
Auto Trait Implementations§
impl<G> Freeze for TraversalService<G>where
G: Freeze,
impl<G> RefUnwindSafe for TraversalService<G>where
G: RefUnwindSafe,
impl<G> Send for TraversalService<G>
impl<G> Sync for TraversalService<G>
impl<G> Unpin for TraversalService<G>where
G: Unpin,
impl<G> UnwindSafe for TraversalService<G>where
G: UnwindSafe,
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
Source§impl<T, U> CastableInto<U> for Twhere
U: CastableFrom<T>,
impl<T, U> CastableInto<U> for Twhere
U: CastableFrom<T>,
Source§impl<T, U> CastableInto<U> for Twhere
U: CastableFrom<T>,
impl<T, U> CastableInto<U> for Twhere
U: CastableFrom<T>,
Source§impl<T> DowncastableFrom<T> for T
impl<T> DowncastableFrom<T> for T
Source§fn downcast_from(value: T) -> T
fn downcast_from(value: T) -> T
Truncate the current UnsignedInt to a possibly smaller size
Source§impl<T> DowncastableFrom<T> for T
impl<T> DowncastableFrom<T> for T
Source§fn downcast_from(value: T) -> T
fn downcast_from(value: T) -> T
Truncate the current UnsignedInt to a possibly smaller size
Source§impl<T, U> DowncastableInto<U> for Twhere
U: DowncastableFrom<T>,
impl<T, U> DowncastableInto<U> for Twhere
U: DowncastableFrom<T>,
Source§impl<T, U> DowncastableInto<U> for Twhere
U: DowncastableFrom<T>,
impl<T, U> DowncastableInto<U> for Twhere
U: DowncastableFrom<T>,
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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 moreSource§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
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> UpcastableFrom<T> for T
impl<T> UpcastableFrom<T> for T
Source§fn upcast_from(value: T) -> T
fn upcast_from(value: T) -> T
Extend the current UnsignedInt to a possibly bigger size.
Source§impl<T> UpcastableFrom<T> for T
impl<T> UpcastableFrom<T> for T
Source§fn upcast_from(value: T) -> T
fn upcast_from(value: T) -> T
Extend the current UnsignedInt to a possibly bigger size.