6 #include <zk/config.hpp>
33 const buffer& data()
const & {
return _data; }
34 buffer& data() & {
return _data; }
35 buffer data() && {
return std::move(_data); }
37 const zk::stat& stat()
const {
return _stat; }
45 std::ostream& operator<<(std::ostream&,
const get_result&);
53 using children_list_type = std::vector<std::string>;
60 const children_list_type& children()
const & {
return _children; }
61 children_list_type& children() & {
return _children; }
62 children_list_type children() && {
return std::move(_children); }
64 const stat& parent_stat()
const {
return _parent_stat; }
65 stat& parent_stat() {
return _parent_stat; }
68 children_list_type _children;
84 explicit operator bool()
const {
return bool(_stat); }
85 bool operator!()
const {
return !_stat; }
87 const optional<zk::stat>& stat()
const {
return _stat; }
88 optional<zk::stat>& stat() {
return _stat; }
91 optional<zk::stat> _stat;
94 std::ostream& operator<<(std::ostream&,
const exists_result&);
106 const std::string& name()
const & {
return _name; }
107 std::string& name() & {
return _name; }
108 std::string name() && {
return std::move(_name); }
114 std::ostream& operator<<(std::ostream&,
const create_result&);
126 const zk::stat& stat()
const {
return _stat; }
133 std::ostream& operator<<(std::ostream&,
const set_result&);
145 const zk::acl& acl()
const & {
return _acl; }
146 zk::acl& acl() & {
return _acl; }
147 zk::acl acl() && {
return std::move(_acl); }
149 const zk::stat& stat()
const {
return _stat; }
189 std::ostream& operator<<(std::ostream&,
const event&);
191 std::string to_string(
const event&);
206 get_result
initial() && {
return std::move(_initial); }
209 const future<event>&
next() const & {
return _next; }
210 future<event>&
next() & {
return _next; }
211 future<event>
next() && {
return std::move(_next); }
218 std::ostream& operator<<(std::ostream&,
const watch_result&);
220 std::string to_string(
const watch_result&);
235 get_children_result
initial() && {
return std::move(_initial); }
238 const future<event>&
next() const & {
return _next; }
239 future<event>&
next() & {
return _next; }
240 future<event>
next() && {
return std::move(_next); }
243 get_children_result _initial;
247 std::ostream& operator<<(std::ostream&,
const watch_children_result&);
249 std::string to_string(
const watch_children_result&);
264 exists_result
initial() && {
return std::move(_initial); }
267 const future<event>&
next() const & {
return _next; }
268 future<event>&
next() & {
return _next; }
269 future<event>
next() && {
return std::move(_next); }
272 exists_result _initial;
276 std::ostream& operator<<(std::ostream&,
const watch_exists_result&);
278 std::string to_string(
const watch_exists_result&);
Data delivered when a watched event triggers.
state
Enumeration of states the client may be at when a watch triggers.
const future< event > & next() const &
Future to be delivered when the watch is triggered.
The result type of client::get_acl.
The result type of client::watch_exists.
const get_result & initial() const &
The initial result of the fetch.
The result type of client::create.
Controls the import of the optional and nullopt_t types, as well as the nullopt constexpr.
The result type of client::exists.
The result type of client::watch.
The result type of client::watch_children.
Statistics about a znode, similar to the UNIX stat structure.
const get_children_result & initial() const &
The initial result of the fetch.
const exists_result & initial() const &
The initial result of the fetch.
const future< event > & next() const &
Future to be delivered when the watch is triggered.
Controls the import of future and promise types.
The result type of client::set.
const zk::state & state() const
The state of the connection when the event occurred.
event_type
Enumeration of types of events that may occur.
An access control list is a wrapper around acl_rule instances.
Controls the buffer type.
The result type of client::get_children.
const future< event > & next() const &
Future to be delivered when the watch is triggered.
ZKPP_BUFFER_TYPE buffer
The buffer type.
The result type of client::get.
const event_type & type() const
The type of event that occurred.