diff --git a/Cargo.toml b/Cargo.toml index b23bfba..0939937 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,3 +20,7 @@ rstest = "0.19.0" [features] steering-manifest = ["dep:serde", "dep:serde_json"] + +[package.metadata.docs.rs] +all-features = true +rustdoc-args = ["--cfg", "docsrs"] \ No newline at end of file diff --git a/src/lib.rs b/src/lib.rs index 285e08b..2d90796 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -18,12 +18,14 @@ clippy::too_many_lines, clippy::cognitive_complexity )] +#![cfg_attr(docsrs, feature(doc_cfg))] use std::{collections::HashMap, io, num::NonZeroU8}; pub mod playlist; pub mod tags; +#[cfg_attr(docsrs, doc(cfg(feature = "steering-manifest")))] #[cfg(feature = "steering-manifest")] pub mod steering_manifest; @@ -279,10 +281,10 @@ pub enum KeyFormat { Other(String), } -/// Identifies a [`crate::steering_manifest::SteeringManifest`]. +/// Identifies a [`steering_manifest::SteeringManifest`]. #[derive(Debug, Clone, PartialEq, Eq)] pub struct ContentSteering { - /// The URI identifying the [`crate::steering_manifest::SteeringManifest`]. + /// The URI identifying the [`steering_manifest::SteeringManifest`]. pub server_uri: String, pub pathway_id: Option, } diff --git a/src/playlist.rs b/src/playlist.rs index 55c748a..6e8ce4a 100644 --- a/src/playlist.rs +++ b/src/playlist.rs @@ -115,7 +115,7 @@ pub struct AudioRendition { pub channels: Option, /// Information about this rendition. - info: RenditionInfo, + pub info: RenditionInfo, /// The URI that identifies the Media Playlist file. pub uri: Option, @@ -244,8 +244,8 @@ pub struct MediaPlaylist { /// True if no more Media Segments will be added to the Media Playlist file. pub finished: bool, - /// Whether or not the playlist is for a live mutable stream, or a - /// static immutable stream. `Vod` playlists cannot change. + /// Whether or not the playlist is for a mutable append-only stream, or a + /// static immutable stream. pub playlist_type: Option, /// If Some, indicates the server-recommended minimum distance from diff --git a/src/tags/serialize.rs b/src/tags/serialize.rs index 21fccd6..b0f53d7 100644 --- a/src/tags/serialize.rs +++ b/src/tags/serialize.rs @@ -753,12 +753,11 @@ impl Tag { #[cfg(test)] mod tests { - use std::{collections::HashMap, time::Duration}; use rstest::*; use crate::{ - tags::MediaType, AttributeValue, ContentProtectionConfiguration, EncryptionMethod, + tags::MediaType, ContentProtectionConfiguration, EncryptionMethod, RenditionPlaybackPriority, SupplementalCodec, VideoChannelSpecifier, };