pub struct ClockDomain(/* private fields */);Expand description
Identifies one monotonic clock timeline within this process.
A domain is allocated by new() and is carried by every monotonic instant produced by its clock.
ClockDomain intentionally requires explicit allocation:
ⓘ
use qubit_clock::ClockDomain;
let domain = ClockDomain::default();Implementations§
Source§impl ClockDomain
impl ClockDomain
Sourcepub fn new() -> Self
pub fn new() -> Self
Allocates a domain that is not reused within this process.
Every representable nonzero identifier, including the final one, can be allocated. After the final identifier is returned, later calls panic.
§Returns
A newly allocated process-unique clock domain.
§Panics
Panics if all representable nonzero domain identifiers have been allocated rather than wrapping and reusing a prior identity.
Trait Implementations§
Source§impl Clone for ClockDomain
impl Clone for ClockDomain
Source§fn clone(&self) -> ClockDomain
fn clone(&self) -> ClockDomain
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ClockDomain
Source§impl Debug for ClockDomain
impl Debug for ClockDomain
Source§impl Display for ClockDomain
impl Display for ClockDomain
impl Eq for ClockDomain
Source§impl Hash for ClockDomain
impl Hash for ClockDomain
Source§impl PartialEq for ClockDomain
impl PartialEq for ClockDomain
impl StructuralPartialEq for ClockDomain
Auto Trait Implementations§
impl Freeze for ClockDomain
impl RefUnwindSafe for ClockDomain
impl Send for ClockDomain
impl Sync for ClockDomain
impl Unpin for ClockDomain
impl UnsafeUnpin for ClockDomain
impl UnwindSafe for ClockDomain
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