Giter VIP home page Giter VIP logo

Comments (5)

sbstp avatar sbstp commented on June 14, 2024

It would be nice if you could parse bytes using this library. It probably can already, but a lot of the primitives have a where Stream<Item=char>> which makes it impossible to use them with bytes. Maybe there could be a str and a bytes module where the non-generic primitives are located.

from combine.

Marwes avatar Marwes commented on June 14, 2024

@sbstp It is possible to create parsers for other things than chars easily using satisfy and token both of which work with any kind of streams. It might be nice to have some specialized variants for bytes as well though, what kind of functions would you expect from a byte module?

from combine.

sbstp avatar sbstp commented on June 14, 2024

I would need crlf, digit, letter, space, spaces, strings->bytes. Most of these are an exact copy of the char literal form with a b (to make it a byte instead of char) before it. Could probably be generated using a macro.

from combine.

Marwes avatar Marwes commented on June 14, 2024

So mostly primitives to work with ascii strings then? I suppose that would be a nice addition (which could be added to 1.x as well). It is probably a bit excessive to pull in a libc dependency just for the is_alpha etc functions so I think either reimplementing those functions or pull in https://crates.io/crates/ascii

from combine.

Marwes avatar Marwes commented on June 14, 2024

Closed by 2.0.0

from combine.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.