userver: dump Namespace Reference
Loading...
Searching...
No Matches
dump Namespace Reference

Detailed Description

Dumping of cache-like components.

Classes

struct  Config
 
class  DumpableEntity
 
class  Dumper
 Manages dumps of a cache-like component. More...
 
struct  DynamicConfig
 
class  EncryptedOperationsFactory
 
class  EncryptedReader
 
class  EncryptedWriter
 
class  Error
 
class  FileOperationsFactory
 
class  FileReader
 A handle to a dump file. File operations block the thread. More...
 
class  FileWriter
 A handle to a dump file. File operations block the thread. More...
 
struct  IsDumpedAggregate
 
class  MockReader
 A Reader that reads from a string buffer (used in tests) More...
 
class  MockWriter
 A Writer that appends to a string buffer (used in tests) More...
 
class  OperationsFactory
 An abstract Reader/Writer factory. More...
 
class  Reader
 A general interface for binary data input. More...
 
struct  To
 A marker type used in ADL-found Read More...
 
class  Writer
 A general interface for binary data output. More...
 

Typedefs

using ConfigPatch = ::dynamic_config::userver_dumps::ConfigPatch
 
using TimePoint = std::chrono::time_point<std::chrono::system_clock, std::chrono::microseconds>
 
using SecretKey = utils::NonLoggable<class SecretKeyTag, std::string>
 

Enumerations

enum class  UpdateType {
  kModified ,
  kAlreadyUpToDate
}
 

Functions

template<typename T>
requires (impl::IsDumpableAggregate<T>())
void Write (Writer &writer, const T &value)
 Aggregates dumping support.
 
template<typename T>
requires (impl::IsDumpableAggregate<T>())
Read (Reader &reader, To< T >)
 Aggregates deserialization from dump support.
 
std::string ReadEntire (Reader &reader)
 Reads the rest of the data from reader
 
void Write (Writer &writer, std::string_view value)
 Write-only std::string_view support.
 
void Write (Writer &writer, const std::string &value)
 std::string serialization support
 
std::string Read (Reader &reader, To< std::string >)
 std::string deserialization support
 
void Write (Writer &writer, const char *value)
 Allows writing string literals.
 
template<meta::kIsInteger T>
void Write (Writer &writer, T value)
 Integral types serialization support.
 
template<meta::kIsInteger T>
Read (Reader &reader, To< T >)
 Integral types deserialization support.
 
void Write (Writer &writer, bool value)
 bool serialization support
 
bool Read (Reader &reader, To< bool >)
 bool deserialization support
 
template<typename T>
requires std::is_enum_v<T>
void Write (Writer &writer, T value)
 enum serialization support
 
template<typename T>
requires std::is_enum_v<T>
Read (Reader &reader, To< T >)
 enum deserialization support
 
template<typename Rep, typename Period>
void Write (Writer &writer, std::chrono::duration< Rep, Period > value)
 std::chrono::duration serialization support
 
template<typename Rep, typename Period>
std::chrono::duration< Rep, Period > Read (Reader &reader, To< std::chrono::duration< Rep, Period > >)
 std::chrono::duration deserialization support
 
template<typename Duration>
void Write (Writer &writer, std::chrono::time_point< std::chrono::system_clock, Duration > value)
 std::chrono::time_point serialization support
 
template<typename Duration>
auto Read (Reader &reader, To< std::chrono::time_point< std::chrono::system_clock, Duration > >)
 std::chrono::time_point deserialization support
 
void Write (Writer &writer, const boost::uuids::uuid &value)
 boost::uuids::uuid serialization support
 
boost::uuids::uuid Read (Reader &reader, To< boost::uuids::uuid >)
 boost::uuids::uuid deserialization support
 
template<int Prec, typename RoundPolicy>
void Write (Writer &writer, const decimal64::Decimal< Prec, RoundPolicy > &dec)
 decimal64::Decimal serialization support
 
template<int Prec, typename RoundPolicy>
auto Read (Reader &reader, dump::To< decimal64::Decimal< Prec, RoundPolicy > >)
 decimal64::Decimal deserialization support
 
void Write (Writer &writer, const formats::json::Value &value)
 formats::json::Value serialization support
 
formats::json::Value Read (Reader &reader, To< formats::json::Value >)
 formats::json::Value deserialization support
 
template<typename T>
requires (IsContainer<T> && kIsWritable<meta::RangeValueType<T>>)
void Write (Writer &writer, const T &value)
 Container serialization support.
 
template<typename T>
requires (IsContainer<T> && kIsReadable<meta::RangeValueType<T>>)
Read (Reader &reader, To< T >)
 Container deserialization support.
 
template<typename T, typename U>
requires (kIsWritable<T> && kIsWritable<U>)
void Write (Writer &writer, const std::pair< T, U > &value)
 Pair serialization support (for maps)
 
template<typename T, typename U>
requires (kIsReadable<T> && kIsReadable<U>)
std::pair< T, U > Read (Reader &reader, To< std::pair< T, U > >)
 Pair deserialization support (for maps)
 
template<typename T>
requires kIsWritable<T>
void Write (Writer &writer, const std::optional< T > &value)
 std::optional serialization support
 
template<typename T>
requires kIsReadable<T>
std::optional< T > Read (Reader &reader, To< std::optional< T > >)
 std::optional deserialization support
 
template<typename... Args>
requires (true && ... && kIsWritable<Args>)
void Write (Writer &writer, const std::variant< Args... > &value)
 std::variant serialization support
 
template<typename... Args>
requires (true && ... && (std::is_move_constructible_v<Args> && kIsReadable<Args>))
std::variant< Args... > Read (Reader &reader, To< std::variant< Args... > >)
 std::variant deserialization support
 
template<typename T>
requires kIsReadable<T>
Read (Reader &reader, To< const T >)
 
template<typename Tag, typename T, utils::StrongTypedefOps Ops>
requires kIsWritable<T>
void Write (Writer &writer, const utils::StrongTypedef< Tag, T, Ops > &object)
 utils::StrongTypedef serialization support
 
template<typename Tag, typename T, utils::StrongTypedefOps Ops>
requires kIsReadable<T>
utils::StrongTypedef< Tag, T, Ops > Read (Reader &reader, To< utils::StrongTypedef< Tag, T, Ops > >)
 utils::StrongTypedef deserialization support
 
template<typename T>
requires kIsWritable<T>
void Write (Writer &writer, const std::unique_ptr< T > &ptr)
 std::unique_ptr serialization support
 
template<typename T>
requires kIsReadable<T>
std::unique_ptr< T > Read (Reader &reader, To< std::unique_ptr< T > >)
 std::unique_ptr deserialization support
 
template<typename T>
requires kIsWritable<T>
void Write (Writer &writer, const std::shared_ptr< T > &ptr)
 std::shared_ptr serialization support
 
template<typename T>
requires kIsReadable<T>
std::shared_ptr< T > Read (Reader &reader, To< std::shared_ptr< T > >)
 std::shared_ptr deserialization support
 
template<typename L, typename R, typename... Args>
requires (kIsWritable<impl::BoostBimapLeftKey<L, R, Args...>> && kIsWritable<impl::BoostBimapRightKey<L, R, Args...>>)
void Write (Writer &writer, const boost::bimap< L, R, Args... > &map)
 boost::bimap serialization support
 
template<typename L, typename R, typename... Args>
requires (kIsReadable<impl::BoostBimapLeftKey<L, R, Args...>> && kIsReadable<impl::BoostBimapRightKey<L, R, Args...>>)
boost::bimap< L, R, Args... > Read (Reader &reader, To< boost::bimap< L, R, Args... > >)
 boost::bimap deserialization support
 
template<typename T, typename Index, typename Alloc>
requires kIsWritable<T>
void Write (Writer &writer, const boost::multi_index_container< T, Index, Alloc > &container)
 boost::multi_index_container serialization support
 
template<typename T, typename Index, typename Alloc>
requires kIsReadable<T>
boost::multi_index_container< T, Index, Alloc > Read (Reader &reader, To< boost::multi_index_container< T, Index, Alloc > >)
 boost::multi_index_container deserialization support
 
std::unique_ptr< dump::OperationsFactoryCreateOperationsFactory (const Config &config, const components::ComponentContext &context)
 
std::unique_ptr< dump::OperationsFactoryCreateDefaultOperationsFactory (const Config &config)
 
void ThrowDumpUnimplemented (const std::string &name)
 
template<typename T>
void WriteJson (Writer &writer, const T &contents)
 Convenience function to use in components::CachingComponentBase::WriteContents override to dump a type in a human readable JSON format.
 
template<typename T>
std::unique_ptr< const T > ReadJson (Reader &reader)
 Convenience function to use in components::CachingComponentBase::ReadContents override to load a dump in a human readable JSON format.
 
template<typename T>
constexpr bool CheckDumpable ()
 
void WriteStringViewUnsafe (Writer &writer, std::string_view value)
 Writes a non-size-prefixed std::string_view
 
std::string_view ReadStringViewUnsafe (Reader &reader)
 Reads a std::string_view
 
std::string_view ReadStringViewUnsafe (Reader &reader, std::size_t size)
 Reads a non-size-prefixed std::string_view
 
std::string_view ReadUnsafeAtMost (Reader &reader, std::size_t max_size)
 Reads a std::string_view
 
void BackUpReadUnsafe (Reader &reader, std::size_t size)
 Moves the internal cursor back by size bytes so that the next call to ReadUnsafeAtMost returns the same data again.
 
template<typename T>
std::string ToBinary (const T &value)
 Converts to binary using Write(Writer&, const T&)
 
template<typename T>
std::remove_const_t< T > FromBinary (std::string data)
 Converts from binary using Read(Reader&, To<T>)
 
template<typename T>
void TestWriteReadCycle (const T &original)
 
template<typename T>
requires std::is_base_of_v<google::protobuf::MessageLite, T>
void Write (Writer &writer, const T &value)
 Protobuf message dumping support.
 
template<typename T>
requires std::is_base_of_v<google::protobuf::MessageLite, T>
Read (Reader &reader, To< T >)
 Protobuf message dumping support.
 
template<typename T, typename Alloc>
void Insert (std::vector< T, Alloc > &cont, T &&elem)
 
template<typename K, typename V, typename Comp, typename Alloc>
void Insert (std::map< K, V, Comp, Alloc > &cont, std::pair< const K, V > &&elem)
 
template<typename K, typename V, typename Hash, typename Eq, typename Alloc>
void Insert (std::unordered_map< K, V, Hash, Eq, Alloc > &cont, std::pair< const K, V > &&elem)
 
template<typename T, typename Comp, typename Alloc>
void Insert (std::set< T, Comp, Alloc > &cont, T &&elem)
 
template<typename T, typename Hash, typename Eq, typename Alloc>
void Insert (std::unordered_set< T, Hash, Eq, Alloc > &cont, T &&elem)
 

Variables

const std::string_view kDump
 
const std::string_view kMaxDumpAge
 
const std::string_view kMinDumpInterval
 

Typedef Documentation

◆ ConfigPatch

using dump::ConfigPatch = ::dynamic_config::userver_dumps::ConfigPatch

Definition at line 30 of file config.hpp.

◆ SecretKey

using dump::SecretKey = utils::NonLoggable<class SecretKeyTag, std::string>

Definition at line 14 of file operations_encrypted.hpp.

◆ TimePoint

using dump::TimePoint = std::chrono::time_point<std::chrono::system_clock, std::chrono::microseconds>

Definition at line 13 of file helpers.hpp.

Enumeration Type Documentation

◆ UpdateType

enum class dump::UpdateType
strong
Enumerator
kModified 

Some new data has appeared since the last update. Dumper will write it on the next WriteDumpAsync call, or as specified by the config.

kAlreadyUpToDate 

There is no new data, but we have verified that the old data is up-to-date. Dumper will bump the dump modification time to now.

Definition at line 48 of file dumper.hpp.

Function Documentation

◆ BackUpReadUnsafe()

void dump::BackUpReadUnsafe ( Reader & reader,
std::size_t size )

Moves the internal cursor back by size bytes so that the next call to ReadUnsafeAtMost returns the same data again.

Note
If there has been no previous call to ReadUnsafeAtMost, or the last read operation was performed using something except ReadUnsafeAtMost, or size is greater than the number of bytes returned, then the behavior is undefined.

◆ CheckDumpable()

template<typename T>
bool dump::CheckDumpable ( )
constexpr

Definition at line 39 of file meta.hpp.

◆ FromBinary()

template<typename T>
std::remove_const_t< T > dump::FromBinary ( std::string data)

Converts from binary using Read(Reader&, To<T>)

Definition at line 24 of file test_helpers.hpp.

◆ Insert() [1/5]

template<typename K, typename V, typename Comp, typename Alloc>
void dump::Insert ( std::map< K, V, Comp, Alloc > & cont,
std::pair< const K, V > && elem )

Definition at line 27 of file meta_containers.hpp.

◆ Insert() [2/5]

template<typename T, typename Comp, typename Alloc>
void dump::Insert ( std::set< T, Comp, Alloc > & cont,
T && elem )

Definition at line 37 of file meta_containers.hpp.

◆ Insert() [3/5]

template<typename K, typename V, typename Hash, typename Eq, typename Alloc>
void dump::Insert ( std::unordered_map< K, V, Hash, Eq, Alloc > & cont,
std::pair< const K, V > && elem )

Definition at line 32 of file meta_containers.hpp.

◆ Insert() [4/5]

template<typename T, typename Hash, typename Eq, typename Alloc>
void dump::Insert ( std::unordered_set< T, Hash, Eq, Alloc > & cont,
T && elem )

Definition at line 42 of file meta_containers.hpp.

◆ Insert() [5/5]

template<typename T, typename Alloc>
void dump::Insert ( std::vector< T, Alloc > & cont,
T && elem )

Customization point: insert an element into a container

Definition at line 22 of file meta_containers.hpp.

◆ Read() [1/17]

template<int Prec, typename RoundPolicy>
auto dump::Read ( Reader & reader,
dump::To< decimal64::Decimal< Prec, RoundPolicy > >  )

decimal64::Decimal deserialization support

Definition at line 211 of file common.hpp.

◆ Read() [2/17]

template<typename L, typename R, typename... Args>
requires (kIsReadable<impl::BoostBimapLeftKey<L, R, Args...>> && kIsReadable<impl::BoostBimapRightKey<L, R, Args...>>)
boost::bimap< L, R, Args... > dump::Read ( Reader & reader,
To< boost::bimap< L, R, Args... > >  )

boost::bimap deserialization support

Definition at line 255 of file common_containers.hpp.

◆ Read() [3/17]

template<typename T, typename Index, typename Alloc>
requires kIsReadable<T>
boost::multi_index_container< T, Index, Alloc > dump::Read ( Reader & reader,
To< boost::multi_index_container< T, Index, Alloc > >  )

boost::multi_index_container deserialization support

Definition at line 291 of file common_containers.hpp.

◆ Read() [4/17]

template<typename T>
requires kIsReadable<T>
T dump::Read ( Reader & reader,
To< const T >  )

Allows reading const T, which is usually encountered as a member of some container

Definition at line 178 of file common_containers.hpp.

◆ Read() [5/17]

template<typename Rep, typename Period>
std::chrono::duration< Rep, Period > dump::Read ( Reader & reader,
To< std::chrono::duration< Rep, Period > >  )

std::chrono::duration deserialization support

Definition at line 169 of file common.hpp.

◆ Read() [6/17]

template<typename Duration>
auto dump::Read ( Reader & reader,
To< std::chrono::time_point< std::chrono::system_clock, Duration > >  )

std::chrono::time_point deserialization support

Note
Only system_clock is supported, because steady_clock can only be used within a single execution

Definition at line 193 of file common.hpp.

◆ Read() [7/17]

template<typename T>
requires kIsReadable<T>
std::optional< T > dump::Read ( Reader & reader,
To< std::optional< T > >  )

std::optional deserialization support

Definition at line 148 of file common_containers.hpp.

◆ Read() [8/17]

template<typename T, typename U>
requires (kIsReadable<T> && kIsReadable<U>)
std::pair< T, U > dump::Read ( Reader & reader,
To< std::pair< T, U > >  )

Pair deserialization support (for maps)

Definition at line 131 of file common_containers.hpp.

◆ Read() [9/17]

template<typename T>
requires kIsReadable<T>
std::shared_ptr< T > dump::Read ( Reader & reader,
To< std::shared_ptr< T > >  )

std::shared_ptr deserialization support

Warning
If two or more shared_ptr within a single dumped entity point to the same object, they will point to its distinct copies after loading a dump

Definition at line 233 of file common_containers.hpp.

◆ Read() [10/17]

template<typename T>
requires kIsReadable<T>
std::unique_ptr< T > dump::Read ( Reader & reader,
To< std::unique_ptr< T > >  )

std::unique_ptr deserialization support

Definition at line 209 of file common_containers.hpp.

◆ Read() [11/17]

template<typename... Args>
requires (true && ... && (std::is_move_constructible_v<Args> && kIsReadable<Args>))
std::variant< Args... > dump::Read ( Reader & reader,
To< std::variant< Args... > >  )

std::variant deserialization support

Definition at line 166 of file common_containers.hpp.

◆ Read() [12/17]

template<typename T>
requires (impl::IsDumpableAggregate<T>())
T dump::Read ( Reader & reader,
To< T >  )

Aggregates deserialization from dump support.

To enable dumps and loads for an aggregate, add in the global namespace:

template <>
struct dump::IsDumpedAggregate<MyStruct>;
Warning
Don't forget to increment format-version if data layout changes

Definition at line 88 of file aggregates.hpp.

◆ Read() [13/17]

template<meta::kIsInteger T>
T dump::Read ( Reader & reader,
To< T >  )

Integral types deserialization support.

Floating-point deserialization support.

Definition at line 98 of file common.hpp.

◆ Read() [14/17]

template<typename T>
requires std::is_enum_v<T>
T dump::Read ( Reader & reader,
To< T >  )

enum deserialization support

Definition at line 140 of file common.hpp.

◆ Read() [15/17]

template<typename T>
requires (IsContainer<T> && kIsReadable<meta::RangeValueType<T>>)
T dump::Read ( Reader & reader,
To< T >  )

Container deserialization support.

Definition at line 108 of file common_containers.hpp.

◆ Read() [16/17]

template<typename T>
requires std::is_base_of_v<google::protobuf::MessageLite, T>
T dump::Read ( Reader & reader,
To< T >  )

Protobuf message dumping support.

Definition at line 36 of file protobuf.hpp.

◆ Read() [17/17]

template<typename Tag, typename T, utils::StrongTypedefOps Ops>
requires kIsReadable<T>
utils::StrongTypedef< Tag, T, Ops > dump::Read ( Reader & reader,
To< utils::StrongTypedef< Tag, T, Ops > >  )

utils::StrongTypedef deserialization support

Definition at line 192 of file common_containers.hpp.

◆ ReadJson()

template<typename T>
std::unique_ptr< const T > dump::ReadJson ( Reader & reader)

Convenience function to use in components::CachingComponentBase::ReadContents override to load a dump in a human readable JSON format.

See also
Local cache dumps

Definition at line 41 of file json_helpers.hpp.

◆ ReadStringViewUnsafe() [1/2]

std::string_view dump::ReadStringViewUnsafe ( Reader & reader)

Reads a std::string_view

Warning
The string_view will be invalidated on the next Read operation

◆ ReadStringViewUnsafe() [2/2]

std::string_view dump::ReadStringViewUnsafe ( Reader & reader,
std::size_t size )

Reads a non-size-prefixed std::string_view

Note
The caller must somehow know the string size in advance
Warning
The string_view will be invalidated on the next Read operation

◆ ReadUnsafeAtMost()

std::string_view dump::ReadUnsafeAtMost ( Reader & reader,
std::size_t max_size )

Reads a std::string_view

Note
Normally, exactly max_size bytes is returned. On end-of-file, the amount of bytes returned can be less than max_size.
Warning
The string_view will be invalidated on the next Read operation

◆ TestWriteReadCycle()

template<typename T>
void dump::TestWriteReadCycle ( const T & original)

Write a value to a cache dump and immediately read it back. If Write and Read are implemented correctly, the result should be equal to the original value.

Definition at line 35 of file test_helpers.hpp.

◆ ToBinary()

template<typename T>
std::string dump::ToBinary ( const T & value)

Converts to binary using Write(Writer&, const T&)

Definition at line 16 of file test_helpers.hpp.

◆ Write() [1/17]

template<typename L, typename R, typename... Args>
requires (kIsWritable<impl::BoostBimapLeftKey<L, R, Args...>> && kIsWritable<impl::BoostBimapRightKey<L, R, Args...>>)
void dump::Write ( Writer & writer,
const boost::bimap< L, R, Args... > & map )

boost::bimap serialization support

Definition at line 243 of file common_containers.hpp.

◆ Write() [2/17]

template<typename T, typename Index, typename Alloc>
requires kIsWritable<T>
void dump::Write ( Writer & writer,
const boost::multi_index_container< T, Index, Alloc > & container )

boost::multi_index_container serialization support

Definition at line 281 of file common_containers.hpp.

◆ Write() [3/17]

template<int Prec, typename RoundPolicy>
void dump::Write ( Writer & writer,
const decimal64::Decimal< Prec, RoundPolicy > & dec )
inline

decimal64::Decimal serialization support

Definition at line 205 of file common.hpp.

◆ Write() [4/17]

template<typename T>
requires kIsWritable<T>
void dump::Write ( Writer & writer,
const std::optional< T > & value )

std::optional serialization support

Definition at line 138 of file common_containers.hpp.

◆ Write() [5/17]

template<typename T, typename U>
requires (kIsWritable<T> && kIsWritable<U>)
void dump::Write ( Writer & writer,
const std::pair< T, U > & value )

Pair serialization support (for maps)

Definition at line 123 of file common_containers.hpp.

◆ Write() [6/17]

template<typename T>
requires kIsWritable<T>
void dump::Write ( Writer & writer,
const std::shared_ptr< T > & ptr )

std::shared_ptr serialization support

Warning
If two or more shared_ptr within a single dumped entity point to the same object, they will point to its distinct copies after loading a dump

Definition at line 221 of file common_containers.hpp.

◆ Write() [7/17]

template<typename T>
requires kIsWritable<T>
void dump::Write ( Writer & writer,
const std::unique_ptr< T > & ptr )

std::unique_ptr serialization support

Definition at line 199 of file common_containers.hpp.

◆ Write() [8/17]

template<typename... Args>
requires (true && ... && kIsWritable<Args>)
void dump::Write ( Writer & writer,
const std::variant< Args... > & value )

std::variant serialization support

Definition at line 158 of file common_containers.hpp.

◆ Write() [9/17]

template<typename T>
requires (impl::IsDumpableAggregate<T>())
void dump::Write ( Writer & writer,
const T & value )

Aggregates dumping support.

To enable dumps and loads for an aggregate, add in the global namespace:

template <>
struct dump::IsDumpedAggregate<MyStruct>;
Warning
Don't forget to increment format-version if data layout changes

Definition at line 72 of file aggregates.hpp.

◆ Write() [10/17]

template<typename T>
requires (IsContainer<T> && kIsWritable<meta::RangeValueType<T>>)
void dump::Write ( Writer & writer,
const T & value )

Container serialization support.

Definition at line 97 of file common_containers.hpp.

◆ Write() [11/17]

template<typename T>
requires std::is_base_of_v<google::protobuf::MessageLite, T>
void dump::Write ( Writer & writer,
const T & value )

Protobuf message dumping support.

Definition at line 29 of file protobuf.hpp.

◆ Write() [12/17]

template<typename Tag, typename T, utils::StrongTypedefOps Ops>
requires kIsWritable<T>
void dump::Write ( Writer & writer,
const utils::StrongTypedef< Tag, T, Ops > & object )

utils::StrongTypedef serialization support

Definition at line 185 of file common_containers.hpp.

◆ Write() [13/17]

template<typename Rep, typename Period>
void dump::Write ( Writer & writer,
std::chrono::duration< Rep, Period > value )

std::chrono::duration serialization support

Definition at line 146 of file common.hpp.

◆ Write() [14/17]

template<typename Duration>
void dump::Write ( Writer & writer,
std::chrono::time_point< std::chrono::system_clock, Duration > value )

std::chrono::time_point serialization support

Note
Only system_clock is supported, because steady_clock can only be used within a single execution

Definition at line 185 of file common.hpp.

◆ Write() [15/17]

void dump::Write ( Writer & writer,
std::string_view value )

Write-only std::string_view support.

See also
ReadStringViewUnsafe

◆ Write() [16/17]

template<meta::kIsInteger T>
void dump::Write ( Writer & writer,
T value )

Integral types serialization support.

Floating-point serialization support.

Definition at line 88 of file common.hpp.

◆ Write() [17/17]

template<typename T>
requires std::is_enum_v<T>
void dump::Write ( Writer & writer,
T value )

enum serialization support

Definition at line 133 of file common.hpp.

◆ WriteJson()

template<typename T>
void dump::WriteJson ( Writer & writer,
const T & contents )

Convenience function to use in components::CachingComponentBase::WriteContents override to dump a type in a human readable JSON format.

See also
Local cache dumps

Definition at line 28 of file json_helpers.hpp.

◆ WriteStringViewUnsafe()

void dump::WriteStringViewUnsafe ( Writer & writer,
std::string_view value )

Writes a non-size-prefixed std::string_view

Note
writer.Write(str) should normally be used instead to write strings

Variable Documentation

◆ kDump

const std::string_view dump::kDump
extern

Definition at line 34 of file dumper.hpp.