ngl_server 1.0
基于 Actor 模型的 C++ 服务器框架
std::formatter< ngl::pack_head > Struct Reference

std::formatter特化,用于格式化输出pack_head对象。 More...

#include <pack_head.h>

Public Member Functions

constexpr auto parse (std::format_parse_context &ctx)
 解析格式化字符串。
template<typename FormatContext>
auto format (const ngl::pack_head &val, FormatContext &ctx) const
 格式化pack_head对象。

Detailed Description

std::formatter特化,用于格式化输出pack_head对象。

支持将pack_head对象格式化为可读的字符串,包含掩码、字节数、时间戳、协议号、actor ID等信息。

Member Function Documentation

◆ format()

template<typename FormatContext>
auto std::formatter< ngl::pack_head >::format ( const ngl::pack_head & val,
FormatContext & ctx ) const
inline

格式化pack_head对象。

Parameters
val要格式化的pack_head对象。
ctx格式化上下文。
Returns
格式化后的输出迭代器。

◆ parse()

auto std::formatter< ngl::pack_head >::parse ( std::format_parse_context & ctx)
inlineconstexpr

解析格式化字符串。

Parameters
ctx格式化上下文。
Returns
解析结束位置。

The documentation for this struct was generated from the following file: