userver: /data/code/userver/libraries/proto-structs/src/proto-structs/io/context_base.cpp Source File
Loading...
Searching...
No Matches
context_base.cpp
1#include <userver/proto-structs/io/context.hpp>
2
3#include <fmt/format.h>
4#include <google/protobuf/descriptor.h>
5
6#include <userver/utils/impl/internal_tag.hpp>
7
8USERVER_NAMESPACE_BEGIN
9
10namespace proto_structs::io {
11
13 const ::google::protobuf::Descriptor* last_message_desc = nullptr;
15
18
19 if (field_desc) {
21 } else {
22 result.append(fmt::format(".<unknown_{}>", current_field_number));
23 }
24 }
25
26 return result;
27}
28
30 const ::google::protobuf::Descriptor* last_message_desc = nullptr;
32
36 } else {
37 result.append(fmt::format(".<unknown_{}>", current_field_desc.number()));
38 }
39 }
40
41 return result;
42}
43
45 const ::google::protobuf::Descriptor* last_message_desc = nullptr;
47}
48
51
53 result.reserve(128);
55
56 for (const auto& field_number : path_) {
58
62 } else {
63 result.append(fmt::format(".<unknown_{}>", field_number));
64 current_ptr = nullptr;
65 break;
66 }
67 }
68
70 return result;
72
73template <typename TError>
75 return errors_;
76}
77
78template <typename TError>
80 return std::move(errors_);
81}
82
83template <typename TError>
87
88template <typename TError>
93
94template <typename TError>
98
99template <typename TError>
102 throw Error{errors_.back()};
103}
104
105template class ContextWithErrors<ReadError>;
106template class ContextWithErrors<WriteError>;
107
108} // namespace proto_structs::io
109
110USERVER_NAMESPACE_END