[][src]Struct cuna::time::TimeStamp

pub struct TimeStamp { /* fields omitted */ }

Implementations

impl TimeStamp[src]

pub fn new(minutes: u32, seconds: u32, frames: u32) -> Self[src]

Constructs a new TimeStamp with minutes, seconds and frames

Panics

Panics if seconds >= 60 or frames >= 75

pub fn from_msf_opt(minutes: u32, seconds: u32, frames: u32) -> Option<Self>[src]

Constructs a new TimeStamp with minutes, seconds and frames, or returns None if seconds >= 60 or frames >= 75

pub const fn from_msf(minutes: u32, seconds: u32, frames: u32) -> Self[src]

Constructs a new TimeStamp with minutes, seconds and frames

It never panics, if seconds or frames are too big, they will be carried over into a larger unit

pub const fn minutes(&self) -> u32[src]

pub const fn seconds(&self) -> u32[src]

pub const fn frames(&self) -> u32[src]

pub fn set_minutes(&mut self, minutes: u32)[src]

pub fn set_seconds(&mut self, seconds: u32)[src]

Panics

Panics if seconds >= 60

pub fn set_frames(&mut self, frames: u32)[src]

Panics

Panics if frames >= 75

pub const fn as_seconds(&self) -> u32[src]

pub const fn as_frames(&self) -> u32[src]

Trait Implementations

impl Clone for TimeStamp[src]

impl Copy for TimeStamp[src]

impl Debug for TimeStamp[src]

impl Default for TimeStamp[src]

impl Display for TimeStamp[src]

impl Eq for TimeStamp[src]

impl From<Duration> for TimeStamp[src]

impl From<TimeStamp> for Duration[src]

impl FromStr for TimeStamp[src]

type Err = ParseError

The associated error which can be returned from parsing.

impl Hash for TimeStamp[src]

impl PartialEq<TimeStamp> for TimeStamp[src]

impl StructuralEq for TimeStamp[src]

impl StructuralPartialEq for TimeStamp[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.