8 #include <unordered_map>
10 #include "common/datatypes/Value.h"
11 #include "common/thrift/ThriftTypes.h"
21 std::unordered_map<std::string, Value> props;
25 : src(std::move(v.src)),
26 dst(std::move(v.dst)),
27 type(std::move(v.type)),
28 name(std::move(v.name)),
29 ranking(std::move(v.ranking)),
30 props(std::move(v.props)) {}
32 : src(v.src), dst(v.dst), type(v.type), name(v.name), ranking(v.ranking), props(v.props) {}
38 std::unordered_map<std::string, Value>&& p)
43 ranking(std::move(r)),
44 props(std::move(p)) {}
52 std::string toString()
const;
54 bool operator==(
const Edge& rhs)
const;
64 bool operator<(
const Edge& rhs)
const;
66 bool contains(
const Value& key)
const;
68 const Value& value(
const std::string& key)
const;
71 inline std::ostream& operator<<(std::ostream& os,
const Edge& v) {
72 return os << v.toString();
81 struct hash<nebula::Edge> {
82 std::size_t operator()(
const nebula::Edge& h)
const noexcept;