add method to get current buffer from bt list/dict consumer

This commit is contained in:
Thomas Winget 2020-09-25 12:18:30 -04:00 committed by Jason Rhinelander
parent 0ac1d48bc8
commit f37e619d7b
1 changed files with 3 additions and 0 deletions

View File

@ -639,6 +639,9 @@ public:
bt_list_consumer(const bt_list_consumer&) = default;
bt_list_consumer& operator=(const bt_list_consumer&) = default;
/// Get a copy of the current buffer
std::string_view current_buffer() const { return data; }
/// Returns true if the next value indicates the end of the list
bool is_finished() const { return data.front() == 'e'; }
/// Returns true if the next element looks like an encoded string