mirror of
https://github.com/sile/hls_m3u8.git
synced 2024-12-23 12:30:29 +00:00
Add documentation
This commit is contained in:
parent
761360c0d3
commit
2690f2b1eb
2 changed files with 25 additions and 8 deletions
|
@ -1,12 +1,14 @@
|
|||
use trackable::error::{ErrorKind as TrackableErrorKind, TrackableError};
|
||||
|
||||
/// This crate specific `Error` type.
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Error(TrackableError<ErrorKind>);
|
||||
derive_traits_for_trackable_error_newtype!(Error, ErrorKind);
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
/// Possible error kinds.
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
||||
#[allow(missing_docs)]
|
||||
pub enum ErrorKind {
|
||||
InvalidInput,
|
||||
Other,
|
||||
}
|
||||
impl TrackableErrorKind for ErrorKind {}
|
||||
|
|
27
src/lib.rs
27
src/lib.rs
|
@ -1,18 +1,33 @@
|
|||
//! [HLS] m3u8 parser/generator.
|
||||
//!
|
||||
//! [HLS]: https://tools.ietf.org/html/rfc8216
|
||||
//!
|
||||
//! # Examples
|
||||
//!
|
||||
//! TODO
|
||||
#![warn(missing_docs)]
|
||||
#[macro_use]
|
||||
extern crate trackable;
|
||||
|
||||
pub use error::{Error, ErrorKind};
|
||||
pub use master_playlist::MasterPlaylist;
|
||||
pub use media_playlist::MediaPlaylist;
|
||||
|
||||
pub mod attribute;
|
||||
pub mod master_playlist;
|
||||
pub mod media_playlist;
|
||||
pub mod media_segment;
|
||||
pub mod string;
|
||||
pub mod segment {
|
||||
//! Media segment.
|
||||
pub use super::media_segment::{MediaSegment, MediaSegmentBuilder};
|
||||
}
|
||||
pub mod tag;
|
||||
pub mod value;
|
||||
pub mod version;
|
||||
|
||||
mod attribute;
|
||||
mod error;
|
||||
pub mod line;
|
||||
mod line;
|
||||
mod master_playlist;
|
||||
mod media_playlist;
|
||||
mod media_segment;
|
||||
mod string;
|
||||
|
||||
/// This crate specific `Result` type.
|
||||
pub type Result<T> = std::result::Result<T, Error>;
|
||||
|
|
Loading…
Reference in a new issue