Merge branch 'main' into all_features
All checks were successful
Rust/spacepackets/pipeline/head This commit looks good

This commit is contained in:
Robin Müller 2022-12-19 11:03:46 +01:00
commit b9cd08cefe
3 changed files with 10 additions and 4 deletions

View File

@ -35,9 +35,9 @@ default-features = false
version = "1.0" version = "1.0"
[features] [features]
default = ["std", "dep:serde"] default = ["std"]
std = ["chrono/std", "chrono/clock", "alloc"] std = ["chrono/std", "chrono/clock", "alloc"]
serde = ["chrono/serde"] serde = ["dep:serde", "chrono/serde"]
alloc = ["postcard/alloc", "chrono/alloc"] alloc = ["postcard/alloc", "chrono/alloc"]
[package.metadata.docs.rs] [package.metadata.docs.rs]

View File

@ -28,12 +28,15 @@ It also offers optional support for [`serde`](https://serde.rs/). This allows se
deserializing them with an appropriate `serde` provider like deserializing them with an appropriate `serde` provider like
[`postcard`](https://github.com/jamesmunns/postcard). [`postcard`](https://github.com/jamesmunns/postcard).
Default features: ## Default features
- [`std`](https://doc.rust-lang.org/std/): Enables functionality relying on the standard library. - [`std`](https://doc.rust-lang.org/std/): Enables functionality relying on the standard library.
- [`alloc`](https://doc.rust-lang.org/alloc/): Enables features which operate on containers - [`alloc`](https://doc.rust-lang.org/alloc/): Enables features which operate on containers
like [`alloc::vec::Vec`](https://doc.rust-lang.org/beta/alloc/vec/struct.Vec.html). like [`alloc::vec::Vec`](https://doc.rust-lang.org/beta/alloc/vec/struct.Vec.html).
Enabled by the `std` feature. Enabled by the `std` feature.
## Optional Features
- [`serde`](https://serde.rs/): Adds `serde` support for most types by adding `Serialize` and `Deserialize` `derive`s - [`serde`](https://serde.rs/): Adds `serde` support for most types by adding `Serialize` and `Deserialize` `derive`s
# Examples # Examples

View File

@ -22,12 +22,15 @@
//! deserializing them with an appropriate `serde` provider like //! deserializing them with an appropriate `serde` provider like
//! [`postcard`](https://github.com/jamesmunns/postcard). //! [`postcard`](https://github.com/jamesmunns/postcard).
//! //!
//! Default features: //! ### Default features
//! //!
//! - [`std`](https://doc.rust-lang.org/std/): Enables functionality relying on the standard library. //! - [`std`](https://doc.rust-lang.org/std/): Enables functionality relying on the standard library.
//! - [`alloc`](https://doc.rust-lang.org/alloc/): Enables features which operate on containers //! - [`alloc`](https://doc.rust-lang.org/alloc/): Enables features which operate on containers
//! like [`alloc::vec::Vec`](https://doc.rust-lang.org/beta/alloc/vec/struct.Vec.html). //! like [`alloc::vec::Vec`](https://doc.rust-lang.org/beta/alloc/vec/struct.Vec.html).
//! Enabled by the `std` feature. //! Enabled by the `std` feature.
//!
//! ### Optional features
//!
//! - [`serde`](https://serde.rs/): Adds `serde` support for most types by adding `Serialize` and //! - [`serde`](https://serde.rs/): Adds `serde` support for most types by adding `Serialize` and
//! `Deserialize` `derive`s //! `Deserialize` `derive`s
//! //!