fuchsia_inspect_contrib::nodes

Trait 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.

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.

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§