Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide a way to materialize an OwnedElement from the current value of a previously initialized reader #413

Closed
dlurton opened this issue Sep 7, 2022 · 2 comments

Comments

@dlurton
Copy link

dlurton commented Sep 7, 2022

Possibly, this is just a single function on StreamReader, like this:

trait StreamReader {
    /// Materializes only the current value from the specified `reader`.  
    pub fn read_element<'a>(&mut self) -> IonResult<Option<OwnedElement>> {
        ...
    }
}

This would ultimately invoke this function to actually perform the materialization.

@zslayton
Copy link
Contributor

Fixed in #485.

@dlurton
Copy link
Author

dlurton commented May 3, 2023

#485 does not actually satisfy this request. The none of the ElementReader functions introduced there read the current value of the StreamReader. The closest one, StreamReader::read_next_element advances to the next element and then reads. I need one that just reads the current element.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants