pub struct Time {
pub h: u32,
pub m: u32,
pub s: u32,
pub ms: u32,
pub frames: u32,
pub fps: f32,
}
Fields§
§h: u32
§m: u32
§s: u32
§ms: u32
§frames: u32
§fps: f32
Implementations§
source§impl Time
impl Time
pub fn total_ms(&self) -> u32
pub fn update_from_fps_frames(&mut self) -> Result<(), Box<dyn Error>>
pub fn derive_frames(&mut self)
pub fn set_fps(&mut self, fps: f32)
pub fn update_from_ms(&mut self, ms: u32) -> Result<(), Box<dyn Error>>
pub fn add_ms(&mut self, ms: u32) -> Result<(), Box<dyn Error>>
pub fn sub_ms(&mut self, ms: u32) -> Result<(), &mut Time>
pub fn to_ass_string(self) -> String
pub fn to_srt_string(self) -> String
Trait Implementations§
source§impl AddAssign<i32> for Time
impl AddAssign<i32> for Time
source§fn add_assign(&mut self, other: i32)
fn add_assign(&mut self, other: i32)
Performs the
+=
operation. Read moresource§impl AddAssign<u32> for Time
impl AddAssign<u32> for Time
source§fn add_assign(&mut self, other: u32)
fn add_assign(&mut self, other: u32)
Performs the
+=
operation. Read moresource§impl<'de> Deserialize<'de> for Time
impl<'de> Deserialize<'de> for Time
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 Error for Time
impl Error for Time
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl PartialEq for Time
impl PartialEq for Time
impl Eq for Time
impl StructuralPartialEq for Time
Auto Trait Implementations§
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