* Returns a mutable span to the buffer's whole data. * * This function must be called only on owned buffers, otherwise it will * throw. * * The span returned by this function must not be used after one of the assign * methods is called. * * @return A mutable span to the buffer's whole data. */
| 575 | * @return A mutable span to the buffer's whole data. |
| 576 | */ |
| 577 | inline span<char> owned_mutable_span() & { |
| 578 | if (!is_owned()) |
| 579 | throw BufferStatusException( |
| 580 | "Cannot get a mutable span of a non-owned buffer."); |
| 581 | return buffer_owner_; |
| 582 | } |
| 583 | |
| 584 | /** |
| 585 | * Implicit conversion operator to span. |
no test coverage detected