Struct trustfall_core::interpreter::trace::AdapterTap
source · pub struct AdapterTap<'vertex, AdapterT>where
AdapterT: Adapter<'vertex>,
AdapterT::Vertex: Clone + Debug + PartialEq + Eq + Serialize + DeserializeOwned + 'vertex,{ /* private fields */ }
Expand description
An adapter “middleware” that records all adapter operations into a linear, replayable trace.
Tapping adapters must be done at top level, on the top-level adapter which is being used
for query execution i.e. where the <V>
generic on the resolver methods
is the same as AdapterT::Vertex
.
Otherwise, the recorded traces may not be possible to replay since they would be incomplete: they would only capture a portion of the execution, the rest of which is missing.
Implementations§
Trait Implementations§
source§impl<'vertex, AdapterT> Adapter<'vertex> for AdapterTap<'vertex, AdapterT>where
AdapterT: Adapter<'vertex>,
AdapterT::Vertex: Clone + Debug + PartialEq + Eq + Serialize + DeserializeOwned + 'vertex,
impl<'vertex, AdapterT> Adapter<'vertex> for AdapterTap<'vertex, AdapterT>where AdapterT: Adapter<'vertex>, AdapterT::Vertex: Clone + Debug + PartialEq + Eq + Serialize + DeserializeOwned + 'vertex,
source§fn resolve_starting_vertices(
&self,
edge_name: &Arc<str>,
parameters: &EdgeParameters,
resolve_info: &ResolveInfo
) -> VertexIterator<'vertex, Self::Vertex>
fn resolve_starting_vertices( &self, edge_name: &Arc<str>, parameters: &EdgeParameters, resolve_info: &ResolveInfo ) -> VertexIterator<'vertex, Self::Vertex>
Produce an iterator of vertices for the specified starting edge. Read more
source§fn resolve_property<V: AsVertex<Self::Vertex> + 'vertex>(
&self,
contexts: ContextIterator<'vertex, V>,
type_name: &Arc<str>,
property_name: &Arc<str>,
resolve_info: &ResolveInfo
) -> ContextOutcomeIterator<'vertex, V, FieldValue>
fn resolve_property<V: AsVertex<Self::Vertex> + 'vertex>( &self, contexts: ContextIterator<'vertex, V>, type_name: &Arc<str>, property_name: &Arc<str>, resolve_info: &ResolveInfo ) -> ContextOutcomeIterator<'vertex, V, FieldValue>
Resolve a property required by the query that’s being evaluated. Read more
source§fn resolve_neighbors<V: AsVertex<Self::Vertex> + 'vertex>(
&self,
contexts: ContextIterator<'vertex, V>,
type_name: &Arc<str>,
edge_name: &Arc<str>,
parameters: &EdgeParameters,
resolve_info: &ResolveEdgeInfo
) -> ContextOutcomeIterator<'vertex, V, VertexIterator<'vertex, Self::Vertex>>
fn resolve_neighbors<V: AsVertex<Self::Vertex> + 'vertex>( &self, contexts: ContextIterator<'vertex, V>, type_name: &Arc<str>, edge_name: &Arc<str>, parameters: &EdgeParameters, resolve_info: &ResolveEdgeInfo ) -> ContextOutcomeIterator<'vertex, V, VertexIterator<'vertex, Self::Vertex>>
Resolve the neighboring vertices across an edge. Read more
source§fn resolve_coercion<V: AsVertex<Self::Vertex> + 'vertex>(
&self,
contexts: ContextIterator<'vertex, V>,
type_name: &Arc<str>,
coerce_to_type: &Arc<str>,
resolve_info: &ResolveInfo
) -> ContextOutcomeIterator<'vertex, V, bool>
fn resolve_coercion<V: AsVertex<Self::Vertex> + 'vertex>( &self, contexts: ContextIterator<'vertex, V>, type_name: &Arc<str>, coerce_to_type: &Arc<str>, resolve_info: &ResolveInfo ) -> ContextOutcomeIterator<'vertex, V, bool>
Attempt to coerce vertices to a subtype, as required by the query that’s being evaluated. Read more
source§impl<'vertex, AdapterT> Clone for AdapterTap<'vertex, AdapterT>where
AdapterT: Adapter<'vertex> + Clone,
AdapterT::Vertex: Clone + Debug + PartialEq + Eq + Serialize + DeserializeOwned + 'vertex + Clone,
impl<'vertex, AdapterT> Clone for AdapterTap<'vertex, AdapterT>where AdapterT: Adapter<'vertex> + Clone, AdapterT::Vertex: Clone + Debug + PartialEq + Eq + Serialize + DeserializeOwned + 'vertex + Clone,
source§fn clone(&self) -> AdapterTap<'vertex, AdapterT>
fn clone(&self) -> AdapterTap<'vertex, AdapterT>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl<'vertex, AdapterT> !RefUnwindSafe for AdapterTap<'vertex, AdapterT>
impl<'vertex, AdapterT> !Send for AdapterTap<'vertex, AdapterT>
impl<'vertex, AdapterT> !Sync for AdapterTap<'vertex, AdapterT>
impl<'vertex, AdapterT> Unpin for AdapterTap<'vertex, AdapterT>where AdapterT: Unpin,
impl<'vertex, AdapterT> !UnwindSafe for AdapterTap<'vertex, AdapterT>
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