TracingAdapter

Struct TracingAdapter 

Source
pub struct TracingAdapter<'vertex, AdapterT>
where AdapterT: Adapter<'vertex>, AdapterT::Vertex: Debug + Clone + 'vertex,
{ pub tracer: Rc<RefCell<Tracer>>, /* private fields */ }
Expand description

Traces an inner adapter. Constructed with TracingAdapter::new(). Each tracer is only valid for one query. When switching between queries, if you use the same adapter, ensure you first call TracingAdapter::finish(), otherwise the new operations will be traced with the old.

Fields§

§tracer: Rc<RefCell<Tracer>>

Implementations§

Source§

impl<'vertex, AdapterT> TracingAdapter<'vertex, AdapterT>
where AdapterT: Adapter<'vertex>, AdapterT::Vertex: Debug + Clone + 'vertex,

Source

pub fn new(adapter: AdapterT) -> Self

Source

pub fn finish(&self) -> Tracer

Finalise the trace and return it.

Trait Implementations§

Source§

impl<'vertex, AdapterT> Adapter<'vertex> for TracingAdapter<'vertex, AdapterT>
where AdapterT: Adapter<'vertex> + 'vertex, AdapterT::Vertex: Debug + Clone + 'vertex,

Source§

type Vertex = <AdapterT as Adapter<'vertex>>::Vertex

The type of vertices in the dataset this adapter queries. Unless your intended vertex type is cheap to clone, consider wrapping it an Rc or Arc to make cloning it cheaper since that’s a fairly common operation when queries are evaluated.
Source§

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>

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>>

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>

Attempt to coerce vertices to a subtype, as required by the query that’s being evaluated. Read more
Source§

impl<'vertex, AdapterT> Clone for TracingAdapter<'vertex, AdapterT>
where AdapterT: Adapter<'vertex> + Clone, AdapterT::Vertex: Debug + Clone + 'vertex,

Source§

fn clone(&self) -> TracingAdapter<'vertex, AdapterT>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'vertex, AdapterT> Debug for TracingAdapter<'vertex, AdapterT>
where AdapterT: Adapter<'vertex> + Debug, AdapterT::Vertex: Debug + Clone + 'vertex,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'vertex, AdapterT> Freeze for TracingAdapter<'vertex, AdapterT>
where <AdapterT as Adapter<'vertex>>::Vertex: Sized, AdapterT: Freeze,

§

impl<'vertex, AdapterT> !RefUnwindSafe for TracingAdapter<'vertex, AdapterT>

§

impl<'vertex, AdapterT> !Send for TracingAdapter<'vertex, AdapterT>

§

impl<'vertex, AdapterT> !Sync for TracingAdapter<'vertex, AdapterT>

§

impl<'vertex, AdapterT> Unpin for TracingAdapter<'vertex, AdapterT>
where <AdapterT as Adapter<'vertex>>::Vertex: Sized, AdapterT: Unpin,

§

impl<'vertex, AdapterT> !UnwindSafe for TracingAdapter<'vertex, AdapterT>

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<V> AsVertex<V> for V
where V: Debug + Clone,

Source§

fn as_vertex(&self) -> Option<&V>

Dereference this value into a &V, if the value happens to contain a V. Read more
Source§

fn into_vertex(self) -> Option<V>

Consume self and produce the contained V, if one was indeed present. 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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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 more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.