Commit graph

64 commits

Author SHA1 Message Date
debris eb138b12b9 updated toml version in the docs 0.4.2 2017-06-23 23:16:25 +02:00
Alex Crichton bac92cdfad Update doc urls to 0.4
Closes #168
2017-05-02 09:20:11 -07:00
Dzmitry Malyshau 962506e5d6 Fixed the serde dependency in the documentation 2017-04-24 10:05:55 -04:00
Colin Kiegel 22168aa100 group mod statements consistently 2017-04-05 21:30:32 +02:00
Colin Kiegel 9d761f5614 doc - group link definitions 2017-04-05 20:51:36 +02:00
Jake Goulding 90630d66fb Remove newline that causes strange rendering 2017-02-09 10:41:58 -05:00
Jake Goulding f49d0b3246 Tighten up the crate-level docs 2017-02-09 10:12:23 -05:00
Alex Crichton e256931e9b Rewrite crate with serde support from ground up
This commit completely rewrites this crate from the ground up,
supporting serde at the lowest levels as I believe serde support was
intended to do. This is a major change from the previous versions of
this crate, with a summary of changes being:

* Serialization directly to TOML is now supported without going through
  a `Value` first.

* Deserialization directly from TOML is now supported without going
  through a `Value`. Note that due to the TOML format some values still
  are buffered in intermediate memory, but overall this should be at a
  minimum now.

* The API of `Value` was overhauled to match the API of
  `serde_json::Value`. The changes here were to:

  * Add `is_*` accessors
  * Add `get` and `get_mut` for one-field lookups.
  * Implement panicking lookups through `Index`

  The old `index` methods are now gone in favor of `get` and `Index`
  implementations.

* A `Datetime` type has been added to represent a TOML datetime in a
  first-class fashion. Currently this type provides no accessors other
  than a `Display` implementation, but the idea is that this will grow
  support over time for decomposing the date.

* Support for the `rustc-serialize` crate has been dropped, that'll stay
  on the 0.2 and 0.1 release trains.

* This crate no longer supports the detection of unused fields, for that though
  you can use the `serde_ignored` crate on crates.io
2017-02-08 21:21:18 -08:00
Alex Crichton 0dc5347946 Clarify that serde is supported
Closes #122
2017-01-09 17:37:05 -08:00
Alex Crichton f66b9913f9 Escape control characters when encoding strings
Closes #126
2016-12-30 17:34:11 -08:00
Alex Crichton 4ee9cb72e6 Touch up the encoder/decoder a bit
* Whitespace things
* Don't make `State` public
* Remove `#[cfg]` annotations
2016-07-29 10:23:06 -07:00
leonardo.yvens e8097b14f1 Clippy run 2016-06-03 23:19:15 -03:00
James Sanderson 848227c605 Require a newline after table definition 2016-04-17 22:51:43 +01:00
Bourgond Aries 644dc88c04 Add a bunch of negative and positive tests 2016-03-28 06:35:39 +02:00
Bourgond Aries 568dd2ef4b Fix the indentation to be consistent with the repository 2016-03-27 21:19:03 +02:00
Bourgond Aries 442f663c2d Add advanced lookup for table names 2016-03-27 20:55:49 +02:00
Bourgond Aries 770052a9a7 Add a test for lookup_mut_advanced 2016-03-27 20:50:25 +02:00
Bourgond Aries 0e3e0654ba Implement advanced key lookup for lookup_mut 2016-03-27 20:48:23 +02:00
Bourgond Aries 3517215eab Implement a more advanced algorithm for lookup
The new algorithm allows the explicit usage of "" and '' to denote key
names. This is useful for accessing tables or keys that are named in a
non-conventional manner.
2016-03-27 20:46:19 +02:00
Bourgond Aries b171205c57 Add a test to see if the table's contents have changed 2016-03-25 17:43:32 +01:00
Bourgond Aries 32969ca891 Implement the non-recursive lookup_mut
Also include some tests simply by copying and modifying
the other tests for lookup.
2016-03-25 17:33:46 +01:00
Bourgond Aries 9b1dc843fc Add lookup_mut method for mutable access
Mutable access may sometimes be desired in order to change values
in the toml table. This can be used for dynamic configurations which
will be easy to modify and store.

lookup_mut requires a recursive method due to the borrow checker
not allowing to have more than one mutable reference in the same
scope.
2016-03-24 14:18:00 +01:00
Corey Farwell 7be39d725d Address issues found by rust-clippy 2016-01-21 08:38:09 -05:00
Kerhong 547e202c15 Implement Value::lookup for empty path to return self 2015-09-25 19:26:47 +03:00
Erick Tryzelaar 4e0172a9a5 Merge remote-tracking branch 'remotes/origin/master' into serde 2015-08-12 22:15:58 -07:00
Alex Crichton b70f6e53b2 Don't need to qualify String 2015-08-11 09:18:52 -07:00
Andrzej Janik 8487b63c97 Rework fix for table redefinition to avoid breaking AST-compatiblity 2015-06-06 18:11:48 +02:00
Andrzej Janik 2fcd829b1d Disallow table redefinitions 2015-06-04 20:23:46 +02:00
Alex Crichton 41563ee01b wip 2015-04-02 17:12:37 -07:00
Alex Crichton 2d49247b92 Modularize rustc-serialize support
* Add rustc-serialize as a default feature
* Make room for for serde support
2015-04-02 17:07:37 -07:00
Alex Crichton cd33b87bf9 Bump to 0.1.20 2015-04-01 09:56:05 -07:00
Alex Crichton c8a5ca4ece Bump to 0.1.19 2015-03-25 10:11:05 -07:00
Alex Crichton 2c5aa07722 Implement Encodable for Value
We can't generically decode into one, but we can generically encode one!

Closes #58
2015-03-20 10:53:36 -07:00
Alex Crichton b852af0a60 Improve test coverage 2015-03-15 11:26:32 -07:00
Alex Crichton ff3bb7d255 Reduce usage of unstable features 2015-03-09 11:09:07 -07:00
Alex Crichton e14c2052b7 Don't upload extra docs on travis 2015-03-03 20:35:04 -08:00
Steven Fackler 93e5ace69c Add a doc root url 2015-03-03 20:27:09 -05:00
Alex Crichton 0042025904 Bump to 0.1.16 2015-02-03 08:37:05 -08:00
Alex Crichton 68e6c34b90 Move show.rs to display.rs 2015-02-02 22:30:06 -08:00
Alex Crichton c6b2aea11e Fix a deprecation warning 2015-02-02 22:29:51 -08:00
Alex Crichton 0a6a1cabde Add some feature gates 2015-01-29 08:42:02 -08:00
Alex Crichton 482752b5f4 Migrate to as many stable functions as possible 2015-01-27 19:29:58 -08:00
Alex Crichton 0d8ce979a4 Move tests to integration tests 2015-01-15 12:44:05 -08:00
Alex Crichton d4319caa20 Bump to 0.1.11 2015-01-09 11:50:54 -08:00
Valerii Hiora 1dfb94afba Update to master
- features
- macro reform
- String/Show split in formatter
- staging
2015-01-08 19:50:03 +02:00
Alex Crichton 6195861f53 Remove old_orphan_check 2015-01-06 07:34:16 -08:00
Valerii Hiora aeb765b723 Fallout of serialize traits changes 2015-01-06 15:39:06 +02:00
Valerii Hiora 887e5ff844 Update to master
- updated `rustc-serialize` dependency, in other case `toml-rs`
  prohibits `rustc-serialize` update on other crates
- updated after syntax and lib changes
2015-01-03 18:01:19 +02:00
Alex Crichton 31ee496621 Update to rust master 2014-12-23 08:01:45 -08:00
Alex Crichton 95c6161dce Update to rust master 2014-12-20 22:35:30 -08:00