pub struct CMTimebase { /* private fields */ }Available on crate feature
cm only.Expand description
Owned wrapper around CMTimebaseRef.
Implementations§
Source§impl CMTimebase
impl CMTimebase
Sourcepub fn with_master_clock(master_clock: &CMClock) -> Result<Self, i32>
pub fn with_master_clock(master_clock: &CMClock) -> Result<Self, i32>
Create a timebase that uses master_clock as its time source.
Sourcepub unsafe fn from_raw(ptr: *const c_void) -> Option<Self>
pub unsafe fn from_raw(ptr: *const c_void) -> Option<Self>
Adopts a +1 retained CMTimebaseRef and returns None for null.
§Safety
A non-null ptr must be a live CMTimebaseRef of the exact type
carrying one retain transferred to this wrapper. The caller must not
release or separately adopt that transferred retain.
Sourcepub unsafe fn from_raw_borrowed(ptr: *const c_void) -> Option<Self>
pub unsafe fn from_raw_borrowed(ptr: *const c_void) -> Option<Self>
Retains a +0 borrowed CMTimebaseRef and returns an owned wrapper.
§Safety
A non-null ptr must be a live CMTimebaseRef of the exact type for
the duration of the retain call.
Sourcepub const fn as_ptr(&self) -> *const c_void
pub const fn as_ptr(&self) -> *const c_void
Borrow the underlying +0 CMTimebaseRef while self remains alive.
Sourcepub fn master_clock(&self) -> Option<CMClock>
pub fn master_clock(&self) -> Option<CMClock>
Copy the master clock.
Trait Implementations§
Source§impl Clone for CMTimebase
impl Clone for CMTimebase
Source§impl Debug for CMTimebase
impl Debug for CMTimebase
Source§impl Drop for CMTimebase
impl Drop for CMTimebase
impl Eq for CMTimebase
Source§impl Hash for CMTimebase
impl Hash for CMTimebase
Source§impl PartialEq for CMTimebase
impl PartialEq for CMTimebase
impl Send for CMTimebase
impl Sync for CMTimebase
Auto Trait Implementations§
impl Freeze for CMTimebase
impl RefUnwindSafe for CMTimebase
impl Unpin for CMTimebase
impl UnsafeUnpin for CMTimebase
impl UnwindSafe for CMTimebase
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