Trait fuchsia_inspect_contrib::nodes::NodeTimeExt
source · 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.
Object Safety§
This trait is not object safe.