MCPcopy Create free account
hub / github.com/alibaba/zvec / unwrap_expected

Function unwrap_expected

src/binding/python/model/python_collection.cc:42–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40
41template <typename T>
42T unwrap_expected(const tl::expected<T, Status> &exp) {
43 if (exp.has_value()) {
44 return exp.value();
45 }
46 throw_if_error(exp.error());
47 return T{};
48}
49
50void ZVecPyCollection::Initialize(pybind11::module_ &m) {
51 py::class_<Collection, Collection::Ptr> collection(m, "_Collection");

Callers 5

InitializeMethod · 0.85
bind_db_methodsMethod · 0.85
bind_ddl_methodsMethod · 0.85
bind_dml_methodsMethod · 0.85
bind_dql_methodsMethod · 0.85

Calls 4

throw_if_errorFunction · 0.85
has_valueMethod · 0.45
valueMethod · 0.45
errorMethod · 0.45

Tested by

no test coverage detected