userver
C++ Async Framework
Toggle main menu visibility
Loading...
Searching...
No Matches
binary.hpp
Go to the documentation of this file.
1
#pragma once
2
5
6
#include <string>
7
#include <string_view>
8
9
#include <
userver/formats/bson/document.hpp
>
10
#include <
userver/formats/bson/types.hpp
>
11
12
USERVER_NAMESPACE_BEGIN
13
14
namespace
formats::bson
{
15
17
class
BsonString
;
18
20
Document
FromBinaryString
(std::string_view binary);
21
23
BsonString
ToBinaryString
(
const
formats::bson::Document
&);
24
25
namespace
impl {
26
class
BsonStringImpl;
27
}
// namespace impl
28
29
class
BsonString
{
30
public
:
32
explicit
BsonString
(impl::BsonHolder);
34
36
/*implicit*/
operator
std::string()
const
{
return
ToString
(); }
37
39
std::string
ToString
()
const
;
40
42
std::string_view
GetView
()
const
;
43
44
const
uint8_t* Data()
const
;
45
size_t
Size()
const
;
46
47
private
:
48
impl::BsonHolder impl_;
49
};
50
51
}
// namespace formats::bson
52
53
USERVER_NAMESPACE_END
userver
formats
bson
binary.hpp
Generated on
for userver by
Doxygen
1.17.0