pub struct Clock<'turn, 'd> { /* private fields */ }Expand description
Read-only access to the monotonic sample installed for one driver turn.
Implementations§
Source§impl<'turn, 'd> Clock<'turn, 'd>
impl<'turn, 'd> Clock<'turn, 'd>
Sourcepub fn attach<T>(self, build: impl FnOnce(Instant) -> T) -> Bound<'d, T>
pub fn attach<T>(self, build: impl FnOnce(Instant) -> T) -> Bound<'d, T>
Attaches a raw-time owner to this clock’s driver.
Sourcepub fn try_attach<T, E>(
self,
build: impl FnOnce(Instant) -> Result<T, E>,
) -> Result<Bound<'d, T>, E>
pub fn try_attach<T, E>( self, build: impl FnOnce(Instant) -> Result<T, E>, ) -> Result<Bound<'d, T>, E>
Attaches a fallibly constructed raw-time owner to this driver.
Sourcepub fn deadline_at(self, at: Instant) -> Deadline<'d>
pub fn deadline_at(self, at: Instant) -> Deadline<'d>
Adopts an external absolute instant as this driver’s deadline.
Trait Implementations§
Auto Trait Implementations§
impl<'turn, 'd> !RefUnwindSafe for Clock<'turn, 'd>
impl<'turn, 'd> !Send for Clock<'turn, 'd>
impl<'turn, 'd> !Sync for Clock<'turn, 'd>
impl<'turn, 'd> !UnwindSafe for Clock<'turn, 'd>
impl<'turn, 'd> Forget for Clock<'turn, 'd>
impl<'turn, 'd> Freeze for Clock<'turn, 'd>
impl<'turn, 'd> Unpin for Clock<'turn, 'd>
impl<'turn, 'd> UnsafeUnpin for Clock<'turn, 'd>
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