Skip to content

Add a io::Writer wrapper that supports pushback #4031

Closed

Description

@erickt

C's stdio has a function ungetc that lets you push back a single char on a stream. While we could expose support for the c functions, this wouldn't help with our str/bytes writers. Instead, how about we make a trait/impl io::Writer wrapper that supports lookahead and pushback for any io::Writers?

Activity

  1. bstrie commented on May 28, 2013

    @bstrie
    Contributor

    Nominating for Maturity 5, Production Ready

  2. graydon commented on Jul 18, 2013

    @graydon
    Contributor

    sub-bug of #4248, and a feature

  3. graydon commented on Jul 18, 2013

    @graydon
    Contributor

    accepted for feature-complete milestone

  4. pnkfelix commented on Jan 22, 2014

    @pnkfelix
    Contributor

    assigning P-low.

  5. sfackler commented on Jan 22, 2014

    @sfackler
    Member

    Shouldn't this be an io::Reader wrapper?

  6. pongad commented on Mar 3, 2014

    @pongad
    Contributor

    Is something like this what everyone has in mind? https://gist.github.com/pongad/9316641
    I can open a PR if everyone likes it ok.

  7. steveklabnik commented on Feb 15, 2015

    @steveklabnik
    Contributor

    I'm pulling a massive triage effort to get us ready for 1.0. As part of this, I'm moving stuff that's wishlist-like to the RFCs repo, as that's where major new things should get discussed/prioritized.

    This issue has been moved to the RFCs repo: rust-lang/rfcs#856

  8. added a commit that references this issue on Dec 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P-lowLow priority

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions