1
0
mirror of https://github.com/danog/strum.git synced 2024-11-26 20:14:40 +01:00
Commit Graph

49 Commits

Author SHA1 Message Date
Evgeniy Dushistov
e040bf4050 feature: add enum count macros (#37)
* feature: add enum count macros

fix #15

* add docs for EnumCount
2018-11-05 10:36:09 -08:00
Azriel Hoh
1c00f6cfa5 Feature/33/derive enum variants (#34)
* Run rustfmt over repository.

* Bump `syn` to 0.15

* Implemented ability to `serialize_all` using cases from `heck`.

Issue #21

* Use `path` and `version` in dependency specifications.

Issue #21

* Updated documentation.

Issue #21

* Added `CHANGELOG.md`.

* Also convert case when deriving `Display`.

Issue #21

* Added `EnumDiscriminants` derive.

Issue #33

* Added the ability to rename derived `EnumDiscriminants`.

Issue #33

* Updated `README.md` and lib.rs docs.

Issue #33

* Updated `CHANGELOG.md`.

Issue #33

* WIP: refactoring to allow attributes on discriminants enum.

* Use single `strum_discriminants` top level attribute.

Issue #33

* Allow multiple declarations of `strum_discriminants` attribute.

Issue #33

* Pass through all other attributes to discriminant enum.

Issue #33

* Add `impl From<MyEnum> for MyEnumDiscriminants`.

Issue #33

* Add `impl<'_enum> From<&'_enum MyEnum> for MyEnumDiscriminants`.

Issue #33

* Added complex case test for `From` derivation.

Issue #33

* Added docs to some helper functions.

* Added docs about `From` impls.

Issue #33
2018-09-26 12:13:45 -07:00
Peter Glotfelty
b6e4e66157
Did a little bit of refactoring and added some docs around AsStaticStr (#28)
* Did a little bit of refactoring and added some docs around AsStaticStr

* Revving the version in the cargoo.toml

* Managing Cargo.toml is a bit tedious when deploying packages that depend on each other

* Updated Cargo.toml
2018-06-26 08:22:19 -07:00
らりお (YOSHIOKA Takuma)
c91854c2f1 Bump dependencies (syn and quote) (#26)
syn-0.14 and quote-0.6 have been released, and they have breaking
changes.
2018-06-23 09:02:34 -07:00
らりお (YOSHIOKA Takuma)
3988beefb9 Add AsStaticRef trait and let derive(AsRefStr) implement it (#24)
`#[derive(AsRefStr)]` will implement `AsStaticRef<str>`, and it
enables us to get `&'static str` by `AsStaticRef::<str>::as_static()`.

This will solve #23.
2018-05-26 10:57:04 -07:00
らりお (YOSHIOKA Takuma)
e2ed13ad07 Disable missing_docs lint for new types created by EnumIter (#25) 2018-05-23 07:14:17 -07:00
らりお (YOSHIOKA Takuma)
179e8eac35 Bump dependencies (mainly syn crate) (#22)
* Bump dependencies

* Cache intepreted meta to reduce memory allocation
2018-05-12 15:29:21 -07:00
Malte Thiesen
ae40df1383 Implement Clone trait for enum iterators. (#18) 2018-04-16 09:43:32 -07:00
Peter Glotfelty 🚀
e0572b7f6b Updating the docs 2018-03-10 13:10:00 -08:00
Peter Glotfelty 🚀
f039c629e2 Implemented Display for enums and added exactsizeiter to enumiter 2018-03-10 13:06:17 -08:00
Alex Burka
788cb9a0cf don't suggest wildcard dependencies (#14)
* don't suggest wildcard dependencies in readme
* don't suggest wildcard deps in docs
2018-02-08 16:12:17 -08:00
Adam Wittenberg
40c510304c Fix associated type in example generated code (#11) 2017-10-30 10:53:58 -07:00
Peternator7
55f61035f7 Updated README to include AsRefStr 2017-08-23 22:20:39 -07:00
らりお (YOSHIOKA Takuma)
af58a6d403 Add derive(AsRefStr) implementation (#10)
Implements AsRef<str> as a non-allocating alternative to deriving ToString. Docs will come later
2017-08-23 19:18:23 -07:00
Peternator7
c9bba73f9b Updated Cargo.toml 2017-07-01 08:12:00 -07:00
kyren
86a02a4833 Add some missing absolute module paths 2017-06-30 14:36:13 -07:00
wangcong
d0ae6ff71d fix README Some path (#7)
* fix README `Some` path
* add missing `
2017-06-29 13:51:50 -07:00
Peter Glotfelty
645797ec90 Merge pull request #6 from NickeZ/patch-1
Fixed mark down in README
2017-06-29 13:50:38 -07:00
Niklas Claesson
56611a5cf4 Update README.md
Missed one tick
2017-06-28 22:50:43 +02:00
Peter Glotfelty
2fa1b869de Merge pull request #3 from Peternator7/features/tostring
Features/tostring
2017-04-15 19:11:41 -07:00
Peternator7
a82aaa1e0d Fixed a link in the readme 2017-04-15 19:01:58 -07:00
Peternator7
fbea713633 Updated Version. Changed Readme 2017-04-15 18:54:49 -07:00
Peternator7
bb2a37e9b6 Refactored deriviations into different files and added a ToString implementation 2017-04-15 18:08:49 -07:00
Peter Glotfelty
c171612524 Added an Appveyor.yml and fixed small issues in the Cargo.toml 2017-02-25 08:48:20 -08:00
Peter Glotfelty
9dcade9077 Added one more test file 2017-02-23 00:09:57 -08:00
Peter Glotfelty
1801a300d3 Fixed some documentation bugs 2017-02-15 21:16:16 -08:00
Peter Glotfelty
033a376130 Added more test cases and fixed a small bug in how EnumIter handles generics 2017-02-15 19:16:40 -08:00
Peter Glotfelty
42ee963b37 Merged changes from durka and updated docs accordinglt 2017-02-15 18:31:19 -08:00
Peter Glotfelty
a1a871a8cc Merge pull request #1 from durka/abs-paths
strum_macros: absolutize type paths
2017-02-14 19:10:20 -08:00
Alex Burka
1c2548f215 strum_macros: absolutize type paths 2017-02-14 15:22:30 -05:00
Peter Glotfelty
a91a4e35ba Fixed merge conflicts 2017-02-13 23:13:24 -08:00
Peter Glotfelty
ef401fcd27 Added better support for debugging items 2017-02-13 23:11:17 -08:00
Peter Glotfelty
9fa967505c Update README.md 2017-02-12 12:53:37 -08:00
Peter Glotfelty
460700124a Update README.md
Fixed the link on the readme and removed some of the lines that rustdoc parses differently than a standard markdown parser
2017-02-12 12:52:51 -08:00
Peter Glotfelty
088ca638e6 Fixed Cargo.toml in strum 2017-02-11 23:07:06 -08:00
Peter Glotfelty
dca3affc35 Fixed Cargo.toml for strum_macros 2017-02-11 23:05:15 -08:00
Peter Glotfelty
d3b7b7e761 Fixed the links 2017-02-11 23:03:42 -08:00
Peter Glotfelty
04f0726668 Added badges to readme 2017-02-11 23:00:43 -08:00
Peter Glotfelty
7d6738d64a Fixed the Travis script 2017-02-11 22:51:53 -08:00
Peter Glotfelty
271198e96e forgot to remove additional spaces. It's fixed now 2017-02-11 22:46:32 -08:00
Peter Glotfelty
c52cd5942a Revised documentation and it reads better now. Started writing a test crate. 2017-02-11 22:44:40 -08:00
Peter Glotfelty
bbdceacd58 Fixed all the doc tests to actually run. 2017-02-11 11:42:32 -08:00
Peter Glotfelty
e9f28d8273 Added lots more documentation to the project. 2017-02-09 00:23:55 -08:00
Peter Glotfelty
81ab1483bc Added support for lifetimes and generic bounds on enums. Also added support for a default case in from_str and a detailed_message 2017-02-08 23:06:28 -08:00
Peter Glotfelty
61e4924c49 Refactored some code to use more traits and few free functions 2017-02-04 23:32:53 -08:00
Peter Glotfelty
e4c762ee67 Fixed the dependency links to point at github now that the project is being hosted remotely 2017-02-04 18:55:15 -08:00
Peter Glotfelty
edc932f409 Merge branch 'master' of github.com:Peternator7/strum 2017-02-04 18:53:12 -08:00
Peter Glotfelty
87a88dc92c Implemented initial version of macros and code 2017-02-04 18:52:48 -08:00
Peter Glotfelty
2f23362dd2 Initial commit 2017-02-04 18:50:41 -08:00