pub struct Duration(/* private fields */);Expand description
Represents a duration in FFmpeg format (HH:MM:SS.MS or seconds)
Implementations§
Source§impl Duration
impl Duration
Sourcepub fn from_millis(millis: u64) -> Self
pub fn from_millis(millis: u64) -> Self
Create a new duration from milliseconds
Sourcepub fn to_ffmpeg_format(&self) -> String
pub fn to_ffmpeg_format(&self) -> String
Convert to FFmpeg time format (HH:MM:SS.MS)
Sourcepub fn from_ffmpeg_format(s: &str) -> Result<Self>
pub fn from_ffmpeg_format(s: &str) -> Result<Self>
Parse from FFmpeg time format
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Duration
impl<'de> Deserialize<'de> for Duration
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<Duration> for Duration
impl From<Duration> for Duration
Source§fn from(d: StdDuration) -> Self
fn from(d: StdDuration) -> Self
Converts to this type from the input type.
impl Copy for Duration
impl StructuralPartialEq for Duration
Auto Trait Implementations§
impl Freeze for Duration
impl RefUnwindSafe for Duration
impl Send for Duration
impl Sync for Duration
impl Unpin for Duration
impl UnwindSafe for Duration
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