pub trait NodeTimeExt<T: Timeline> {
// Required methods
fn create_time(
&self,
name: impl Into<StringReference>,
) -> CreateTimeResult<T>;
fn create_time_at(
&self,
name: impl Into<StringReference>,
timestamp: Instant<T>,
) -> TimeProperty<T>;
fn record_time(&self, name: impl Into<StringReference>) -> Instant<T>;
}
Expand description
Extension trait that allows to manage timestamp properties.
Required Methods§
Sourcefn create_time(&self, name: impl Into<StringReference>) -> CreateTimeResult<T>
fn create_time(&self, name: impl Into<StringReference>) -> CreateTimeResult<T>
Creates a new property holding the current timestamp on the given timeline. Returns the current timestamp that was used for the returned property too.
Sourcefn create_time_at(
&self,
name: impl Into<StringReference>,
timestamp: Instant<T>,
) -> TimeProperty<T>
fn create_time_at( &self, name: impl Into<StringReference>, timestamp: Instant<T>, ) -> TimeProperty<T>
Creates a new property holding the given timestamp.
Sourcefn record_time(&self, name: impl Into<StringReference>) -> Instant<T>
fn record_time(&self, name: impl Into<StringReference>) -> Instant<T>
Records a new property holding the current timestamp and returns the instant that was recorded.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.