Struct redis_graph::GraphResult [−][src]
pub struct GraphResult {
pub data: HashMap<String, GraphValue>,
}Expand description
A graph query can return one or multiple values for every matching entry. A GraphResult contains a map of values for a single match. The map keys are the query RETURN statements, values can be of any GraphValue type in any order. The impl also contains some helper methods for easier extraction of graph values.
use redis_graph::GraphResult;
let res = GraphResult::default();
let name:Option<String> = res.get_scalar("person2.name");
let person = res.get_node("person");
let friend_rel = res.get_relation("friend");
Fields
data: HashMap<String, GraphValue>A map of raw return keys to GraphValues.
Implementations
Represents a group of returned graph values for a single matched result in the query. Contains some helper methods for easier extraction of graph values.
Returns a single GraphValue by it’s key.
Tries to extract a graph Scalar value into target type T. Will return None in case the key does not exist, the target value is not a Scalar or the value could not be parsed into T.
Tries to extract a graph Node value from Value at key. Will return
None in case the key does not exist or the target value is not a
Node.
Tries to extract a graph Relation value from Value at key. Will return
None in case the key does not exist or the target value is not a
Relation.
Trait Implementations
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl RefUnwindSafe for GraphResult
impl Send for GraphResult
impl Sync for GraphResult
impl Unpin for GraphResult
impl UnwindSafe for GraphResult
Blanket Implementations
Mutably borrows from an owned value. Read more
