pub struct Time(/* private fields */);Expand description
Represents a position in time used for seeking and trimming.
Implementations§
Source§impl Time
impl Time
Sourcepub fn from_seconds(seconds: u64) -> Self
pub fn from_seconds(seconds: u64) -> Self
Create an instance from whole seconds.
Sourcepub fn from_seconds_f64(seconds: f64) -> Self
pub fn from_seconds_f64(seconds: f64) -> Self
Create from a floating-point second representation.
Sourcepub const fn from_duration(duration: Duration) -> Self
pub const fn from_duration(duration: Duration) -> Self
Create from an existing Duration.
Sourcepub const fn as_duration(self) -> Duration
pub const fn as_duration(self) -> Duration
Convert to std Duration.
Sourcepub fn to_ffmpeg_timestamp(self) -> String
pub fn to_ffmpeg_timestamp(self) -> String
Convert to the timestamp format expected by FFmpeg (HH:MM:SS.mmm).
Trait Implementations§
Source§impl Ord for Time
impl Ord for Time
Source§impl PartialOrd for Time
impl PartialOrd for Time
impl Copy for Time
impl Eq for Time
impl StructuralPartialEq for Time
Auto Trait Implementations§
impl Freeze for Time
impl RefUnwindSafe for Time
impl Send for Time
impl Sync for Time
impl Unpin for Time
impl UnwindSafe for Time
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more