1
0
Fork 0
mirror of https://github.com/sile/hls_m3u8.git synced 2024-12-22 20:16:27 +00:00

document crate features

This commit is contained in:
Luro02 2020-04-09 08:54:56 +02:00
parent f0d91c5e7c
commit 7a918d31bd
No known key found for this signature in database
GPG key ID: B66FD4F74501A9CF

View file

@ -57,6 +57,40 @@
//! assert!(m3u8.parse::<MediaPlaylist>().is_ok());
//! ```
//!
//! ## Crate Feature Flags
//!
//! The following crate feature flags are available:
//!
//! - [`backtrace`] (optional)
//! - Enables the backtrace feature for the `Error` type.
//! - This feature depends on the following dependencies:
//! - [`backtrace`]
//! - [`chrono`] (optional)
//! - Enables parsing dates and verifying them.
//! - This feature depends on the following dependencies:
//! - [`chrono`]
//! - The following things will change:
//! - [`ExtXProgramDateTime::date_time`] will change from [`String`] to
//! `DateTime<FixedOffset>`
//! - [`ExtXDateRange::start_date`] will change from [`String`] to
//! `DateTime<FixedOffset>`
//! - [`ExtXDateRange::end_date`] will change from [`String`] to
//! `DateTime<FixedOffset>`
//!
//! They are configured in your `Cargo.toml` and can be enabled like this
//!
//! ```toml
//! hls_m3u8 = { version = "0.3", features = ["chrono", "backtrace"] }
//! ```
//!
//! [`ExtXProgramDateTime::date_time`]:
//! crate::tags::ExtXProgramDateTime::date_time
//! [`ExtXDateRange::start_date`]:
//! crate::tags::ExtXDateRange::start_date
//! [`ExtXDateRange::end_date`]:
//! crate::tags::ExtXDateRange::end_date
//! [`chrono`]: https://github.com/chronotope/chrono
//! [`backtrace`]: https://github.com/rust-lang/backtrace-rs
//! [HLS]: https://tools.ietf.org/html/rfc8216
pub use error::Error;