Commit graph

81 commits

Author SHA1 Message Date
Dion Dokter d44e382a9a Added no_std support. 2022-08-02 12:36:48 +03:00
Stu 4d7c606a75 Remove no_inline from Spanned import 2020-11-13 20:42:06 +01:00
Bram Geron f12a16274b Rustdoc: Add links. Show all reexports as reexports. (#377)
* Rustdoc: Add links. Show all reexports as reexports.

* Reformat.
2020-02-25 12:07:55 -06:00
Sergey "Shnatsel" Davidoff ef8cca002a Forbid unsafe code (#332)
* Forbid unsafe code

* Add badge advertising that unsafe code is forbidden

* Revert "Add badge advertising that unsafe code is forbidden"

This reverts commit e8d35d20d016a341d37969b975463588d3143528.

* Comment on #![forbid(unsafe_code)]

* Run rustfmt
2019-09-30 09:57:16 -05:00
Pietro Albini c6745eeaeb include Spanned in the docs
The `Spanned` struct was originally included in the docs as a re-export,
but rustdoc doesn't render re-exports if the module from which it's
exported isn't documented.

Since `Spanned` is the only public item inside the `spanned` module this
commit shows the struct as a normal item in the index, and moves the
example from the module docs to the struct docs.
2019-08-09 20:48:46 +02:00
Eric Huss 0737f0b27a 2018 edition idioms. 2019-05-08 17:37:38 -07:00
Eric Huss 68fd59c78d Migrate to 2018 edition. 2019-05-08 12:12:14 -07:00
Eric Huss 10fb80090c Bump html_root_url version. 2019-04-25 11:15:42 -07:00
Vincent Prouillet 8621ab27ae Add the preserve_order feature 2018-12-28 14:42:55 +01:00
Eric Huss 57e78ee3bc Indicate this is now supporting version 0.5 of TOML. 2018-11-21 09:41:57 -08:00
John-John Tedro 0616d3562c Make spanned module private and hide internals 2018-05-09 21:54:22 +02:00
John-John Tedro 407845d620 Fix incorrectly reported spans for Datetime 2018-05-07 05:36:41 +02:00
John-John Tedro 8a9ae07de5 Use BorrowedStrDeserializer instead of generated key deserializers 2018-05-07 04:57:16 +02:00
John-John Tedro 6b919f8833 Use custom struct/field naming to deserialize spans 2018-05-07 04:28:00 +02:00
David Tolnay 6db43965f9 Proof of concept: reporting span information to a Spanned<T> type 2018-05-06 11:06:00 +02:00
David Tolnay eab7d806e9 A toml macro 2017-11-12 23:46:34 -08:00
Garrett Berg ec82e695ba fix docs and add 2017-07-22 15:11:23 -06:00
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