pub struct GraphSpy<G: SwhGraph> {
pub graph: G,
pub history: Arc<Mutex<Vec<(&'static str, String)>>>,
}
Expand description
Wraps a graph, and records calls to its methods, useful for tests
Fields§
§graph: G
§history: Arc<Mutex<Vec<(&'static str, String)>>>
Pairs of (method, arguments)
Implementations§
Trait Implementations§
source§impl<G: SwhBackwardGraph> SwhBackwardGraph for GraphSpy<G>
impl<G: SwhBackwardGraph> SwhBackwardGraph for GraphSpy<G>
type Predecessors<'succ> = <G as SwhBackwardGraph>::Predecessors<'succ> where Self: 'succ
source§fn predecessors(&self, node_id: NodeId) -> Self::Predecessors<'_>
fn predecessors(&self, node_id: NodeId) -> Self::Predecessors<'_>
Return an
IntoIterator
over the predecessors of a node.source§impl<G: SwhForwardGraph> SwhForwardGraph for GraphSpy<G>
impl<G: SwhForwardGraph> SwhForwardGraph for GraphSpy<G>
type Successors<'succ> = <G as SwhForwardGraph>::Successors<'succ> where Self: 'succ
source§fn successors(&self, node_id: NodeId) -> Self::Successors<'_>
fn successors(&self, node_id: NodeId) -> Self::Successors<'_>
Return an
IntoIterator
over the successors of a node.source§impl<G: SwhGraph> SwhGraph for GraphSpy<G>
impl<G: SwhGraph> SwhGraph for GraphSpy<G>
source§impl<G: SwhGraphWithProperties> SwhGraphWithProperties for GraphSpy<G>
impl<G: SwhGraphWithProperties> SwhGraphWithProperties for GraphSpy<G>
type Maps = <G as SwhGraphWithProperties>::Maps
type Timestamps = <G as SwhGraphWithProperties>::Timestamps
type Persons = <G as SwhGraphWithProperties>::Persons
type Contents = <G as SwhGraphWithProperties>::Contents
type Strings = <G as SwhGraphWithProperties>::Strings
type LabelNames = <G as SwhGraphWithProperties>::LabelNames
fn properties( &self ) -> &SwhGraphProperties<Self::Maps, Self::Timestamps, Self::Persons, Self::Contents, Self::Strings, Self::LabelNames>
source§impl<G: SwhLabelledBackwardGraph> SwhLabelledBackwardGraph for GraphSpy<G>
impl<G: SwhLabelledBackwardGraph> SwhLabelledBackwardGraph for GraphSpy<G>
type LabelledArcs<'arc> = <G as SwhLabelledBackwardGraph>::LabelledArcs<'arc> where Self: 'arc
type LabelledPredecessors<'succ> = <G as SwhLabelledBackwardGraph>::LabelledPredecessors<'succ> where Self: 'succ
source§fn labelled_predecessors(
&self,
node_id: NodeId
) -> Self::LabelledPredecessors<'_>
fn labelled_predecessors( &self, node_id: NodeId ) -> Self::LabelledPredecessors<'_>
Return an
IntoIterator
over the successors of a node.source§impl<G: SwhLabelledForwardGraph> SwhLabelledForwardGraph for GraphSpy<G>
impl<G: SwhLabelledForwardGraph> SwhLabelledForwardGraph for GraphSpy<G>
type LabelledArcs<'arc> = <G as SwhLabelledForwardGraph>::LabelledArcs<'arc> where Self: 'arc
type LabelledSuccessors<'succ> = <G as SwhLabelledForwardGraph>::LabelledSuccessors<'succ> where Self: 'succ
source§fn labelled_successors(&self, node_id: NodeId) -> Self::LabelledSuccessors<'_>
fn labelled_successors(&self, node_id: NodeId) -> Self::LabelledSuccessors<'_>
Return an
IntoIterator
over the successors of a node.Auto Trait Implementations§
impl<G> RefUnwindSafe for GraphSpy<G>where G: RefUnwindSafe,
impl<G> Send for GraphSpy<G>where G: Send,
impl<G> Sync for GraphSpy<G>where G: Sync,
impl<G> Unpin for GraphSpy<G>where G: Unpin,
impl<G> UnwindSafe for GraphSpy<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
§impl<T, U> CastableInto<U> for Twhere
U: CastableFrom<T>,
impl<T, U> CastableInto<U> for Twhere U: CastableFrom<T>,
§impl<T> DowncastableFrom<T> for T
impl<T> DowncastableFrom<T> for T
§fn downcast_from(value: T) -> T
fn downcast_from(value: T) -> T
Truncate the current UnsignedInt to a possibly smaller size
§impl<T, U> DowncastableInto<U> for Twhere
U: DowncastableFrom<T>,
impl<T, U> DowncastableInto<U> for Twhere U: DowncastableFrom<T>,
§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere T: ?Sized,
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> UpcastableFrom<T> for T
impl<T> UpcastableFrom<T> for T
§fn upcast_from(value: T) -> T
fn upcast_from(value: T) -> T
Extend the current UnsignedInt to a possibly bigger size.