mirror of
https://github.com/sile/hls_m3u8.git
synced 2025-01-11 04:35:24 +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};
|
use trackable::error::{ErrorKind as TrackableErrorKind, TrackableError};
|
||||||
|
|
||||||
|
/// This crate specific `Error` type.
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
pub struct Error(TrackableError<ErrorKind>);
|
pub struct Error(TrackableError<ErrorKind>);
|
||||||
derive_traits_for_trackable_error_newtype!(Error, 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 {
|
pub enum ErrorKind {
|
||||||
InvalidInput,
|
InvalidInput,
|
||||||
Other,
|
|
||||||
}
|
}
|
||||||
impl TrackableErrorKind for ErrorKind {}
|
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]
|
#[macro_use]
|
||||||
extern crate trackable;
|
extern crate trackable;
|
||||||
|
|
||||||
pub use error::{Error, ErrorKind};
|
pub use error::{Error, ErrorKind};
|
||||||
|
pub use master_playlist::MasterPlaylist;
|
||||||
|
pub use media_playlist::MediaPlaylist;
|
||||||
|
|
||||||
pub mod attribute;
|
pub mod segment {
|
||||||
pub mod master_playlist;
|
//! Media segment.
|
||||||
pub mod media_playlist;
|
pub use super::media_segment::{MediaSegment, MediaSegmentBuilder};
|
||||||
pub mod media_segment;
|
}
|
||||||
pub mod string;
|
|
||||||
pub mod tag;
|
pub mod tag;
|
||||||
pub mod value;
|
pub mod value;
|
||||||
pub mod version;
|
pub mod version;
|
||||||
|
|
||||||
|
mod attribute;
|
||||||
mod error;
|
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>;
|
pub type Result<T> = std::result::Result<T, Error>;
|
||||||
|
|
Loading…
Reference in a new issue