58 case FormatOp::TextInline:
59 return WriteRaw(codes_.ReadInlineText());
60 case FormatOp::TextRef:
61 return WriteRaw(codes_.ReadTextRef());
62 case FormatOp::TextSpace:
64 case FormatOp::U32Dec:
65 if constexpr (!HasProfile(Profile, FormatProfile::U32) ||
66 !Config::enable_integer)
68 return ErrorCode::STATE_ERR;
70 return WriteU32Dec(args_.Read<uint32_t>());
71 case FormatOp::U32ZeroPadWidth:
72 if constexpr (!HasProfile(Profile, FormatProfile::U32) ||
73 !Config::enable_integer)
75 return ErrorCode::STATE_ERR;
77 return WriteU32ZeroPadWidth(codes_.Read<uint8_t>(), args_.Read<uint32_t>());
78 case FormatOp::StringRaw:
79 if constexpr (!HasProfile(Profile, FormatProfile::TextArg) ||
82 return ErrorCode::STATE_ERR;
84 return WriteStringRaw(args_.Read<std::string_view>());
85 case FormatOp::F32FixedPrec:
86 if constexpr (!HasProfile(Profile, FormatProfile::F32Fixed) ||
87 !FloatEnabled(FormatType::FloatFixed))
89 return ErrorCode::STATE_ERR;
91 return WriteF32FixedPrec(codes_.Read<uint8_t>(), args_.Read<
float>());
92 case FormatOp::F64FixedPrec:
93 if constexpr (!HasProfile(Profile, FormatProfile::F64Fixed) ||
94 !FloatEnabled(FormatType::DoubleFixed))
96 return ErrorCode::STATE_ERR;
98 return WriteF64FixedPrec(codes_.Read<uint8_t>(), args_.Read<
double>());
99 case FormatOp::GenericField:
100 if constexpr (!HasProfile(Profile, FormatProfile::Generic))
102 return ErrorCode::STATE_ERR;
104 return DispatchGenericField(codes_.ReadFormatType());
107 return ErrorCode::STATE_ERR;