Skip to main content

ClockedProvider

Struct ClockedProvider 

Source
pub struct ClockedProvider<P> { /* private fields */ }
Expand description

inner’s answers, with clock as the present moment: for a caller on a simulated clock, whose messages are dated by it (mako-twin’s sw-sim), so that UTILMD [494] (“nicht nach der Erstellung des Dokuments”) judges them by that clock rather than the wall clock.

Implementations§

Source§

impl<P: ExternalConditionProvider> ClockedProvider<P>

Source

pub fn new(inner: P, clock: Clock) -> Self

Trait Implementations§

Source§

impl<P: ExternalConditionProvider> ExternalConditionProvider for ClockedProvider<P>

Source§

fn evaluate(&self, condition_name: &str) -> ConditionResult

Evaluate an external condition by name. Read more
Source§

fn now(&self) -> DateTime<Utc>

The present moment, for conditions that compare against it: UTILMD [494] “das hier genannte Datum muss der Zeitpunkt sein, zu dem das Dokument erstellt wurde, oder ein Zeitpunkt, der davor liegt”. The wall clock by default; a caller on a simulated clock overrides it.

Auto Trait Implementations§

§

impl<P> !RefUnwindSafe for ClockedProvider<P>

§

impl<P> !UnwindSafe for ClockedProvider<P>

§

impl<P> Freeze for ClockedProvider<P>
where P: Freeze,

§

impl<P> Send for ClockedProvider<P>
where P: Send,

§

impl<P> Sync for ClockedProvider<P>
where P: Sync,

§

impl<P> Unpin for ClockedProvider<P>
where P: Unpin,

§

impl<P> UnsafeUnpin for ClockedProvider<P>
where P: UnsafeUnpin,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.