logo
pub struct TimeVersionedState<S> where
    S: 'static + Default + Send + Sync
{ /* private fields */ }
Expand description

The TimeVersionedState provides a default implementation of the State for a type S. The structure automatically commits the final state for a timestamp into a HashMap and initializes new states for a timestamp t by invoking their default method.

Implementations

Trait Implementations

Returns the “default value” for a type. Read more

The commit method commits the final state for a given timestamp.

Retrieves the last committed timestamp by this state. This method can be used in conjunction with Self::at to retrieve the latest committed state. Read more

Retrieve the state at a given timestamp. If the state for that timestamp hasn’t been initialized yet, invoke the default method on the Self::Item type, and return the newly created state for that timestamp. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more