userver: userver/storages/redis/impl/reply/expire_reply.hpp Source File
Loading...
Searching...
No Matches
expire_reply.hpp
1#pragma once
2
3#include <cstdint>
4#include <string>
5
6#include <userver/storages/redis/impl/types.hpp>
7
8USERVER_NAMESPACE_BEGIN
9
10namespace redis {
11
12class ExpireReply final {
13 public:
14 enum class ExpireReplyValue { kKeyDoesNotExist, kTimeoutWasSet };
15
16 static constexpr ExpireReplyValue kKeyDoesNotExist =
17 ExpireReplyValue::kKeyDoesNotExist;
18 static constexpr ExpireReplyValue kTimeoutWasSet =
19 ExpireReplyValue::kTimeoutWasSet;
20
21 explicit ExpireReply(int64_t value);
22 ExpireReply(ExpireReplyValue value);
23
24 static ExpireReply Parse(ReplyData&& reply_data,
25 const std::string& request_description = {});
26
27 operator ExpireReplyValue() const;
28
29 private:
30 ExpireReplyValue value_;
31};
32
33} // namespace redis
34
35USERVER_NAMESPACE_END