@@ -282,7 +282,7 @@ class serializer::impl
282282 enum class state
283283 {
284284 reset,
285- start ,
285+ initialized ,
286286 headers_set,
287287 header,
288288 body
@@ -309,7 +309,7 @@ class serializer::impl
309309 detail::array_of_const_buffers prepped_;
310310 buffers::const_buffer tmp_;
311311
312- state state_ = state::start ;
312+ state state_ = state::initialized ;
313313 style style_ = style::empty;
314314 uint8_t chunk_header_len_ = 0 ;
315315 bool more_input_ = false ;
@@ -333,7 +333,7 @@ class serializer::impl
333333 reset () noexcept
334334 {
335335 ws_.clear ();
336- state_ = state::start ;
336+ state_ = state::initialized ;
337337 }
338338
339339 auto
@@ -639,11 +639,11 @@ class serializer::impl
639639 message_base const & m)
640640 {
641641 // Precondition violation
642- if (state_ != state::start )
642+ if (state_ != state::initialized )
643643 detail::throw_logic_error ();
644644
645645 // TODO: To uphold the strong exception guarantee,
646- // `state_` must be reset to `state::start ` if an
646+ // `state_` must be reset to `state::initialized ` if an
647647 // exception is thrown during the start operation.
648648 state_ = state::headers_set;
649649
@@ -880,7 +880,13 @@ class serializer::impl
880880 bool
881881 is_done () const noexcept
882882 {
883- return state_ == state::start;
883+ return state_ == state::initialized;
884+ }
885+
886+ bool
887+ is_headers_set () const noexcept
888+ {
889+ return state_ == state::headers_set;
884890 }
885891
886892 detail::workspace&
@@ -1093,22 +1099,22 @@ is_done() const noexcept
10931099 return impl_->is_done ();
10941100}
10951101
1096- // ------------------------------------------------
1097-
1098- detail::workspace&
1102+ bool
10991103serializer::
1100- ws ()
1104+ is_headers_set () const noexcept
11011105{
11021106 BOOST_ASSERT (impl_);
1103- return impl_->ws ();
1107+ return impl_->is_headers_set ();
11041108}
11051109
1106- void
1110+ // ------------------------------------------------
1111+
1112+ detail::workspace&
11071113serializer::
1108- start_empty_impl ()
1114+ ws ()
11091115{
11101116 BOOST_ASSERT (impl_);
1111- impl_->start_empty_impl ();
1117+ return impl_->ws ();
11121118}
11131119
11141120void
@@ -1129,14 +1135,6 @@ start_source_impl(
11291135 impl_->start_source_impl (source);
11301136}
11311137
1132- auto
1133- serializer::
1134- start_stream_impl () -> stream
1135- {
1136- BOOST_ASSERT (impl_);
1137- return impl_->start_stream_impl ();
1138- }
1139-
11401138// ------------------------------------------------
11411139
11421140std::size_t
0 commit comments