Skip to content

Commit

Permalink
clean up invalid example toml and add html_root_url attr (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
KodrAus authored Jan 17, 2019
1 parent 53b2a18 commit ea45dcf
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ keywords = ["serialization", "no_std"]
categories = ["encoding", "no-std"]

[package.metadata.docs.rs]
features = ["derive", "serde"]
features = ["derive", "serde", "test"]

[badges]
travis-ci = { repository = "sval-rs/sval" }
Expand Down
2 changes: 2 additions & 0 deletions derive/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ This `derive` implementation has been shamelessly lifted from dtolnay's `miniser
https://github.com/dtolnay/miniserde
*/

#![doc(html_root_url = "https://docs.rs/sval_derive/0.1.0")]

#![recursion_limit = "128"]

#[macro_use]
Expand Down
2 changes: 2 additions & 0 deletions json/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ This library is no-std, so it can be run in environments
that don't have access to an allocator.
*/

#![doc(html_root_url = "https://docs.rs/sval_json/0.1.0")]

#![no_std]

#[cfg(feature = "std")]
Expand Down
4 changes: 3 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ Use the `serde` Cargo feature to enable integration with `serde`:
```toml,no_run
[dependencies.sval]
features = "serde"
features = ["serde"]
```
When `serde` is available, the `Value` trait can also be derived
Expand All @@ -334,6 +334,8 @@ pub enum Data {
```
*/

#![doc(html_root_url = "https://docs.rs/sval/0.1.0")]

#![no_std]

#[doc(hidden)]
Expand Down
7 changes: 7 additions & 0 deletions src/serde/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
/*!
Integration between `sval` and `serde`.
Add the `serde` feature to your `Cargo.toml` to enable this module:
```toml,no_run
[dependencies.sval]
features = ["serde"]
```
# From `sval` to `serde`
A type that implements [`sval::Value`](../value/trait.Value.html) can be converted into
Expand Down
8 changes: 8 additions & 0 deletions src/stream/stack.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,14 @@ looking at. The stack enforces:
By default, stacks have a fixed depth (currently ~16, but this may change) so they can
work in no-std environments. Each call to `map_begin` or `seq_begin` will increase the
current depth. If this depth is exceeded then calls to `map_begin` or `seq_begin` will fail.
The fixed-depth limit can be removed by adding the `arbitrary-depth` feature to your `Cargo.toml`
(this also requires the standard library):
```toml,no_run
[dependencies.sval]
features = ["arbitrary-depth"]
```
*/
#[derive(Clone)]
pub struct Stack {
Expand Down
7 changes: 7 additions & 0 deletions src/test.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
/*!
Helpers for testing value implementations.
Add the `test` feature to your `Cargo.toml` to enable this module:
```toml,no_run
[dependencies.sval]
features = ["test"]
```
> NOTE: The [`Token`](enum.Token.html) enum is expected to be non-exhaustively
used in tests, so additional members aren't considered
a breaking `semver` change.
Expand Down

0 comments on commit ea45dcf

Please sign in to comment.