pub struct Timeline {
name: TimelineName,
typ: TimeType,
}
Expand description
A time frame/space, e.g. log_time
or frame_nr
, coupled with the type of time
it keeps.
Fields§
§name: TimelineName
Name of the timeline (e.g. log_time
).
typ: TimeType
Sequence or time?
Implementations§
Source§impl Timeline
impl Timeline
pub fn new(name: impl Into<TimelineName>, typ: TimeType) -> Self
Sourcepub fn new_sequence(name: impl Into<TimelineName>) -> Self
pub fn new_sequence(name: impl Into<TimelineName>) -> Self
For things like camera frames or iteration count.
Sourcepub fn new_duration(name: impl Into<TimelineName>) -> Self
pub fn new_duration(name: impl Into<TimelineName>) -> Self
For relative times (e.g. seconds since start).
Sourcepub fn new_timestamp(name: impl Into<TimelineName>) -> Self
pub fn new_timestamp(name: impl Into<TimelineName>) -> Self
For absolute timestamps.
pub fn new_temporal(name: impl Into<TimelineName>) -> Self
Timeline::new_duration
or new_timestamp
insteadpub fn name(&self) -> &TimelineName
pub fn typ(&self) -> TimeType
Sourcepub fn log_time() -> Self
pub fn log_time() -> Self
The log time timeline to which all API functions will always log.
This timeline is automatically maintained by the SDKs and captures the wall-clock time at which point the data was logged (according to the client’s wall-clock).
Sourcepub fn log_tick() -> Self
pub fn log_tick() -> Self
The log tick timeline to which all API functions will always log.
This timeline is automatically maintained by the SDKs and captures the logging tick at
which point the data was logged.
The logging tick is monotically incremented each time the client calls one of the logging
methods on a RecordingStream
.
Sourcepub fn format_time_range(
&self,
time_range: &ResolvedTimeRange,
timestamp_format: TimestampFormat,
) -> String
pub fn format_time_range( &self, time_range: &ResolvedTimeRange, timestamp_format: TimestampFormat, ) -> String
Returns a formatted string of time_range
on this Timeline
.
Sourcepub fn format_time_range_utc(&self, time_range: &ResolvedTimeRange) -> String
pub fn format_time_range_utc(&self, time_range: &ResolvedTimeRange) -> String
Returns a formatted string of time_range
on this Timeline
.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Timeline
impl<'de> Deserialize<'de> for Timeline
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Ord for Timeline
impl Ord for Timeline
Source§impl PartialOrd for Timeline
impl PartialOrd for Timeline
Source§impl SizeBytes for Timeline
impl SizeBytes for Timeline
Source§fn heap_size_bytes(&self) -> u64
fn heap_size_bytes(&self) -> u64
self
uses on the heap. Read moreSource§fn total_size_bytes(&self) -> u64
fn total_size_bytes(&self) -> u64
self
in bytes, accounting for both stack and heap space.Source§fn stack_size_bytes(&self) -> u64
fn stack_size_bytes(&self) -> u64
self
on the stack, in bytes. Read moreimpl Copy for Timeline
impl Eq for Timeline
impl IsEnabled for Timeline
impl StructuralPartialEq for Timeline
Auto Trait Implementations§
impl Freeze for Timeline
impl RefUnwindSafe for Timeline
impl Send for Timeline
impl Sync for Timeline
impl Unpin for Timeline
impl UnwindSafe for Timeline
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more