Code Monkey home page Code Monkey logo

either's Introduction

Either

The enum Either with variants Left and Right and trait implementations including Iterator, Read, Write.

Either has methods that are similar to Option and Result.

Includes convenience macros try_left!() and try_right!() to use for short-circuiting logic.

Please read the API documentation here

build_status crates

How to use with cargo:

[dependencies]
either = "1.0"

Recent Changes

  • 1.1.0
    • Add methods left_and_then, right_and_then by @rampantmonkey
    • Include license files in the repository and released crate
  • 1.0.3
    • Add crate categories
  • 1.0.2
    • Forward more Iterator methods
    • Implement Extend for Either<L, R> if L, R do.
  • 1.0.1
    • Fix Iterator impl for Either to forward .fold().
  • 1.0.0
    • Add default crate feature use_std so that you can opt out of linking to std.
  • 0.1.7
    • Add methods .map_left(), .map_right() and .either().
    • Add more documentation
  • 0.1.3
    • Implement Display, Error
  • 0.1.2
    • Add macros try_left! and try_right!.
  • 0.1.1
    • Implement Deref, DerefMut
  • 0.1.0
    • Initial release
    • Support Iterator, Read, Write

License

Dual-licensed to be compatible with the Rust project.

Licensed under the Apache License, Version 2.0 http://www.apache.org/licenses/LICENSE-2.0 or the MIT license http://opensource.org/licenses/MIT, at your option. This file may not be copied, modified, or distributed except according to those terms.

either's People

Contributors

bluss avatar m4rw3r avatar aomader avatar rampantmonkey avatar pthariensflame avatar twey avatar mglagla avatar stebalien avatar

Watchers

 avatar James Cloos avatar  avatar

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.