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§

source

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.

source

fn create_time_at( &self, name: impl Into<StringReference>, timestamp: Instant<T>, ) -> TimeProperty<T>

Creates a new property holding the given timestamp.

source

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.

Implementations on Foreign Types§

source§

impl<T> NodeTimeExt<T> for Node

source§

fn create_time(&self, name: impl Into<StringReference>) -> CreateTimeResult<T>

source§

fn create_time_at( &self, name: impl Into<StringReference>, timestamp: Instant<T>, ) -> TimeProperty<T>

source§

fn record_time(&self, name: impl Into<StringReference>) -> Instant<T>

Implementors§