#[repr(transparent)]pub struct CMTimeRoundingMethod(pub u32);Available on crate feature
CMTime only.Expand description
Rounding method to use when computing time.value during timescale conversions.
away from 0 if abs(fraction) is >= 0.5.
from larger to smaller scale (ie. from more precision to less precision), but use kCMTimeRoundingMethod_RoundAwayFromZero if converting from smaller to larger scale (ie. from less precision to more precision). Also, never round a negative number down to 0; always return the smallest magnitude negative CMTime in this case (-1/newTimescale).
See also Apple’s documentation
Tuple Fields§
§0: u32Implementations§
Source§impl CMTimeRoundingMethod
impl CMTimeRoundingMethod
pub const RoundHalfAwayFromZero: Self
pub const RoundTowardZero: Self
pub const RoundAwayFromZero: Self
pub const QuickTime: Self
pub const RoundTowardPositiveInfinity: Self
pub const RoundTowardNegativeInfinity: Self
pub const Default: Self
Trait Implementations§
Source§impl Clone for CMTimeRoundingMethod
impl Clone for CMTimeRoundingMethod
Source§fn clone(&self) -> CMTimeRoundingMethod
fn clone(&self) -> CMTimeRoundingMethod
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CMTimeRoundingMethod
impl Debug for CMTimeRoundingMethod
Source§impl Encode for CMTimeRoundingMethod
Available on crate feature objc2 only.
impl Encode for CMTimeRoundingMethod
Available on crate feature
objc2 only.Source§impl Hash for CMTimeRoundingMethod
impl Hash for CMTimeRoundingMethod
Source§impl Ord for CMTimeRoundingMethod
impl Ord for CMTimeRoundingMethod
Source§fn cmp(&self, other: &CMTimeRoundingMethod) -> Ordering
fn cmp(&self, other: &CMTimeRoundingMethod) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for CMTimeRoundingMethod
impl PartialEq for CMTimeRoundingMethod
Source§impl PartialOrd for CMTimeRoundingMethod
impl PartialOrd for CMTimeRoundingMethod
Source§impl RefEncode for CMTimeRoundingMethod
Available on crate feature objc2 only.
impl RefEncode for CMTimeRoundingMethod
Available on crate feature
objc2 only.Source§const ENCODING_REF: Encoding
const ENCODING_REF: Encoding
The Objective-C type-encoding for a reference of this type. Read more
impl Copy for CMTimeRoundingMethod
impl Eq for CMTimeRoundingMethod
impl StructuralPartialEq for CMTimeRoundingMethod
Auto Trait Implementations§
impl Freeze for CMTimeRoundingMethod
impl RefUnwindSafe for CMTimeRoundingMethod
impl Send for CMTimeRoundingMethod
impl Sync for CMTimeRoundingMethod
impl Unpin for CMTimeRoundingMethod
impl UnwindSafe for CMTimeRoundingMethod
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> EncodeArgument for Twhere
T: Encode,
impl<T> EncodeArgument for Twhere
T: Encode,
Source§const ENCODING_ARGUMENT: Encoding = T::ENCODING
const ENCODING_ARGUMENT: Encoding = T::ENCODING
The Objective-C type-encoding for this type.
Source§impl<T> EncodeReturn for Twhere
T: Encode,
impl<T> EncodeReturn for Twhere
T: Encode,
Source§const ENCODING_RETURN: Encoding = T::ENCODING
const ENCODING_RETURN: Encoding = T::ENCODING
The Objective-C type-encoding for this type.