#[repr(i32)]pub enum Type {
Unspecified = 0,
SliceBegin = 1,
SliceEnd = 2,
Instant = 3,
Counter = 4,
}Expand description
Type of the TrackEvent (required if |phase| in LegacyEvent is not set).
Variants§
Unspecified = 0
SliceBegin = 1
Slice events are events that have a begin and end timestamp, i.e. a duration. They can be nested similar to a callstack: If, on the same track, event B begins after event A, but before A ends, B is a child event of A and will be drawn as a nested event underneath A in the UI. Note that child events should always end before their parents (e.g. B before A).
Each slice event is formed by a pair of BEGIN + END events. The END event does not need to repeat any TrackEvent fields it has in common with its corresponding BEGIN event. Arguments and debug annotations of the BEGIN + END pair will be merged during trace import.
Note that we deliberately chose not to support COMPLETE events (which would specify a duration directly) since clients would need to delay writing them until the slice is completed, which can result in reordered events in the trace and loss of unfinished events at the end of a trace.
SliceEnd = 2
Instant = 3
Instant events are nestable events without duration. They can be children of slice events on the same track.
Counter = 4
Event that provides a value for a counter track. |track_uuid| should refer to a counter track and |counter_value| set to the new value. Note that most other TrackEvent fields (e.g. categories, name, ..) are not supported for TYPE_COUNTER events. See also CounterDescriptor.
Implementations§
Source§impl Type
impl Type
Sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
Sourcepub fn from_str_name(value: &str) -> Option<Type>
pub fn from_str_name(value: &str) -> Option<Type>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
Source§impl Ord for Type
impl Ord for Type
Source§impl PartialOrd for Type
impl PartialOrd for Type
impl Copy for Type
impl Eq for Type
impl StructuralPartialEq for Type
Auto Trait Implementations§
impl Freeze for Type
impl RefUnwindSafe for Type
impl Send for Type
impl Sync for Type
impl Unpin for Type
impl UnwindSafe for Type
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> 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<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<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
§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§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].