pub struct ProgramDateTime<'a> { /* private fields */ }Expand description
Corresponds to the #EXT-X-PROGRAM-DATE-TIME tag.
https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis-18#section-4.4.4.6
Implementations§
Source§impl<'a> ProgramDateTime<'a>
impl<'a> ProgramDateTime<'a>
Sourcepub fn new(program_date_time: DateTime) -> Self
pub fn new(program_date_time: DateTime) -> Self
Construct a new ProgramDateTime tag.
Note, the library provides a convenience date_time! macro, in case you are setting the
DateTime using literal values:
use quick_m3u8::{
date_time,
tag::hls::ProgramDateTime,
date::{ DateTime, DateTimeTimezoneOffset}
};
let pdt = ProgramDateTime::new(date_time!(2025-08-03 T 18:26:34.439 -05:00));
assert_eq!(
pdt.program_date_time(),
DateTime {
date_fullyear: 2025,
date_month: 8,
date_mday: 3,
time_hour: 18,
time_minute: 26,
time_second: 34.439,
timezone_offset: DateTimeTimezoneOffset {
time_hour: -5,
time_minute: 0,
},
},
);Sourcepub fn program_date_time(&self) -> DateTime
pub fn program_date_time(&self) -> DateTime
Corresponds to the value of the tag (#EXT-X-PROGRAM-DATE-TIME:<date-time-msec>).
See Self for a link to the HLS documentation for this attribute.
Sourcepub fn set_program_date_time(&mut self, program_date_time: DateTime)
pub fn set_program_date_time(&mut self, program_date_time: DateTime)
Sets the value of the tag.
See Self for a link to the HLS documentation for this attribute.
Trait Implementations§
Source§impl<'a> Clone for ProgramDateTime<'a>
impl<'a> Clone for ProgramDateTime<'a>
Source§fn clone(&self) -> ProgramDateTime<'a>
fn clone(&self) -> ProgramDateTime<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for ProgramDateTime<'a>
impl<'a> Debug for ProgramDateTime<'a>
Source§impl<'a, Custom> From<ProgramDateTime<'a>> for HlsLine<'a, Custom>where
Custom: CustomTag<'a>,
impl<'a, Custom> From<ProgramDateTime<'a>> for HlsLine<'a, Custom>where
Custom: CustomTag<'a>,
Source§fn from(tag: ProgramDateTime<'a>) -> Self
fn from(tag: ProgramDateTime<'a>) -> Self
Converts to this type from the input type.
Source§impl<'a> IntoInnerTag<'a> for ProgramDateTime<'a>
impl<'a> IntoInnerTag<'a> for ProgramDateTime<'a>
Source§fn into_inner(self) -> TagInner<'a>
fn into_inner(self) -> TagInner<'a>
Consume
self and provide TagInner.Source§impl<'a> PartialEq for ProgramDateTime<'a>
impl<'a> PartialEq for ProgramDateTime<'a>
Source§impl<'a> TryFrom<UnknownTag<'a>> for ProgramDateTime<'a>
impl<'a> TryFrom<UnknownTag<'a>> for ProgramDateTime<'a>
Source§type Error = ValidationError
type Error = ValidationError
The type returned in the event of a conversion error.
Auto Trait Implementations§
impl<'a> Freeze for ProgramDateTime<'a>
impl<'a> RefUnwindSafe for ProgramDateTime<'a>
impl<'a> Send for ProgramDateTime<'a>
impl<'a> Sync for ProgramDateTime<'a>
impl<'a> Unpin for ProgramDateTime<'a>
impl<'a> UnsafeUnpin for ProgramDateTime<'a>
impl<'a> UnwindSafe for ProgramDateTime<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more