Skip to content

Commit

Permalink
Mention String ValueEnum in readme (#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
lloydmeta authored Aug 6, 2016
1 parent f5248ce commit 7098cb8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,11 @@ Greeting.withName("SHOUT_GOOD_BYE")

### ValueEnum

Asides from enumerations that resolve members from `String` names, Enumeratum also supports `ValueEnum`s, enums that resolve
members from various primitive types like `Int`, `Long` and`Short`. In order to ensure at compile-time that multiple members
do not share the same value, these enums are powered by a separate macro and exposed through a different set of traits.
Asides from enumerations that resolve members from `String` _names_, Enumeratum also supports `ValueEnum`s, enums that resolve
members from simple _values_ like `Int`, `Long`, `Short`, and `String` (without support for runtime transformations).

These enums are not modelled after `Enumeration` from standard lib, and therefore have the added ability to make sure, at compile-time,
that that multiple members do not share the same value.

```scala
import enumeratum.values._
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import reactivemongo.bson.{ BSONHandler, BSONInteger, BSONLong, BSONReader, BSON
*/

/**
* Holds BSONValue to primitive implicits. The ones that come with ReactiveMongo by default are for subclasses like BSONLong,
* Holds BSONValue to implicits. The ones that come with ReactiveMongo by default are for subclasses like BSONLong,
* but what we want are BSONValue and the Reader/Writer/Handler typeclasses are not covariant.
*/
object BSONValueHandlers extends BSONValueReads with BSONValueWrites {
Expand Down

0 comments on commit 7098cb8

Please sign in to comment.