Skip to content

Commit

Permalink
Improve naming, docs, and ergonomics of VertexInfo trait. (#267)
Browse files Browse the repository at this point in the history
  • Loading branch information
obi1kenobi committed Apr 18, 2023
1 parent eb22012 commit 67accf3
Show file tree
Hide file tree
Showing 3 changed files with 110 additions and 79 deletions.
4 changes: 2 additions & 2 deletions trustfall_core/src/interpreter/hints/dynamic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use super::CandidateValue;

/// Indicates that a property's value is dependent on another value in the query.
///
/// If [`VertexInfo::dynamically_known_property()`](super::VertexInfo::dynamically_known_property)
/// If [`VertexInfo::dynamically_required_property()`](super::VertexInfo::dynamically_required_property)
/// is able to determine a value for the specified property, it returns
/// a [`DynamicallyResolvedValue`]. The specified property's value may be different
/// in different query results, but the way in which it varies can be determined programmatically
Expand Down Expand Up @@ -131,7 +131,7 @@ use super::CandidateValue;
/// contexts: ContextIterator<'a, Vertex>,
/// resolve_info: &ResolveEdgeInfo,
/// ) -> ContextOutcomeIterator<'a, Vertex, VertexIterator<'a, Vertex>> {
/// if let Some(dynamic_value) = resolve_info.destination().dynamically_known_property("address") {
/// if let Some(dynamic_value) = resolve_info.destination().dynamically_required_property("address") {
/// // The query is looking for a specific recipient's address,
/// // so let's look it up directly.
/// dynamic_value.resolve_with(self, contexts, |vertex, candidate| {
Expand Down
Loading

0 comments on commit 67accf3

Please sign in to comment.