1
0
Fork 0
mirror of https://github.com/sile/hls_m3u8.git synced 2024-11-15 20:01:01 +00:00
hls_m3u8/src/lib.rs

58 lines
1.1 KiB
Rust
Raw Normal View History

2019-09-22 18:33:40 +00:00
#![forbid(unsafe_code)]
2019-09-08 10:23:33 +00:00
#![warn(
2020-01-23 16:57:57 +00:00
clippy::pedantic, //
2019-09-08 10:23:33 +00:00
clippy::nursery,
clippy::cargo
)]
2020-01-26 12:12:19 +00:00
#![allow(clippy::multiple_crate_versions, clippy::must_use_candidate)]
2019-09-22 18:33:40 +00:00
#![warn(
missing_docs,
missing_copy_implementations,
missing_debug_implementations,
trivial_casts, // TODO (needed?)
trivial_numeric_casts
)]
2018-02-14 03:00:41 +00:00
//! [HLS] m3u8 parser/generator.
//!
//! [HLS]: https://tools.ietf.org/html/rfc8216
//!
//! # Examples
//!
2018-02-14 19:55:28 +00:00
//! ```
//! use hls_m3u8::MediaPlaylist;
//!
//! let m3u8 = "#EXTM3U
//! #EXT-X-TARGETDURATION:10
//! #EXT-X-VERSION:3
//! #EXTINF:9.009,
//! http://media.example.com/first.ts
//! #EXTINF:9.009,
//! http://media.example.com/second.ts
//! #EXTINF:3.003,
//! http://media.example.com/third.ts
//! #EXT-X-ENDLIST";
//!
//! assert!(m3u8.parse::<MediaPlaylist>().is_ok());
//! ```
2018-02-11 06:10:52 +00:00
2019-10-06 14:39:18 +00:00
pub use error::Error;
pub use master_playlist::MasterPlaylist;
pub use media_playlist::MediaPlaylist;
pub use media_segment::MediaSegment;
2018-02-11 06:10:52 +00:00
2018-02-14 19:51:44 +00:00
pub mod tags;
2018-02-14 03:16:36 +00:00
pub mod types;
2018-02-11 06:10:52 +00:00
2019-10-05 14:24:48 +00:00
#[macro_use]
mod utils;
2018-02-14 03:00:41 +00:00
mod attribute;
2018-02-11 06:10:52 +00:00
mod error;
2018-02-14 03:00:41 +00:00
mod line;
mod master_playlist;
mod media_playlist;
mod media_segment;
2019-10-04 09:02:21 +00:00
mod traits;
2018-02-11 06:10:52 +00:00
2019-09-13 14:06:52 +00:00
pub use error::Result;
2019-10-04 09:02:21 +00:00
pub use traits::*;