#[non_exhaustive]pub enum Time {
Numeric {
value: i64,
timescale: i32,
},
Invalid,
Indefinite,
PositiveInfinity,
NegativeInfinity,
}Expand description
Re-exports the AVPlayer framework surface for this item.
Serializable representation of CMTime.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Numeric
Numeric time represented as value / timescale seconds.
Invalid
kCMTimeInvalid.
Indefinite
kCMTimeIndefinite.
PositiveInfinity
Positive infinity.
NegativeInfinity
Negative infinity.
Implementations§
Source§impl Time
impl Time
Sourcepub const fn new(value: i64, timescale: i32) -> Self
pub const fn new(value: i64, timescale: i32) -> Self
Mirrors the AVPlayer framework constant fn.
Sourcepub const fn indefinite() -> Self
pub const fn indefinite() -> Self
Mirrors the AVPlayer framework constant fn.
Sourcepub const fn positive_infinity() -> Self
pub const fn positive_infinity() -> Self
Mirrors the AVPlayer framework constant fn.
Sourcepub const fn negative_infinity() -> Self
pub const fn negative_infinity() -> Self
Mirrors the AVPlayer framework constant fn.
Sourcepub const fn as_numeric(self) -> Option<(i64, i32)>
pub const fn as_numeric(self) -> Option<(i64, i32)>
Mirrors the AVPlayer framework constant fn.
Trait Implementations§
Source§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
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 UnsafeUnpin 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