pub struct TestClock { /* private fields */ }Expand description
Test clock that allows manual time control for testing.
Implementations§
Source§impl TestClock
impl TestClock
Sourcepub fn new_at(time: DateTime<Utc>) -> Arc<dyn Clock>
pub fn new_at(time: DateTime<Utc>) -> Arc<dyn Clock>
Creates a new TestClock at a specific time.
Sourcepub fn build_for_testing() -> Self
pub fn build_for_testing() -> Self
Creates a concrete TestClock instance for direct use in tests.
Sourcepub fn build_for_testing_at(time: DateTime<Utc>) -> Self
pub fn build_for_testing_at(time: DateTime<Utc>) -> Self
Creates a concrete TestClock instance at a specific time for tests.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TestClock
impl RefUnwindSafe for TestClock
impl Send for TestClock
impl Sync for TestClock
impl Unpin for TestClock
impl UnwindSafe for TestClock
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