#[repr(i32)]pub enum TriggerMode {
Unspecified = 0,
StartTracing = 1,
StopTracing = 2,
CloneSnapshot = 4,
}
Variants§
Unspecified = 0
StartTracing = 1
When this mode is chosen, data sources are not started until one of the |triggers| are received. This supports early initialization and fast starting of the tracing system. On triggering, the session will then record for |stop_delay_ms|. However if no trigger is seen after |trigger_timeout_ms| the session will be stopped and no data will be returned.
StopTracing = 2
When this mode is chosen, the session will be started via the normal EnableTracing() & StartTracing(). If no trigger is ever seen the session will be stopped after |trigger_timeout_ms| and no data will be returned. However if triggered the trace will stop after |stop_delay_ms| and any data in the buffer will be returned to the consumer.
CloneSnapshot = 4
When this mode is chosen, this causes a snapshot of the current tracing session to be created after |stop_delay_ms| while the current tracing session continues undisturbed (% an extra flush). This mode can be used only when the tracing session is handled by the “perfetto” cmdline client (which is true in 90% of cases). Part of the business logic necessary for this behavior, and ensuing file handling, lives in perfetto_cmd.cc . On other consumers, this causes only a notification of the trigger through a CloneTriggerHit ObservableEvent. The custom consumer is supposed to call CloneSession() itself after the event. Use use_clone_snapshot_if_available=true when targeting older versions of perfetto.
Implementations§
Source§impl TriggerMode
impl TriggerMode
Source§impl TriggerMode
impl TriggerMode
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.
Trait Implementations§
Source§impl Clone for TriggerMode
impl Clone for TriggerMode
Source§fn clone(&self) -> TriggerMode
fn clone(&self) -> TriggerMode
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for TriggerMode
impl Debug for TriggerMode
Source§impl Default for TriggerMode
impl Default for TriggerMode
Source§fn default() -> TriggerMode
fn default() -> TriggerMode
Source§impl From<TriggerMode> for i32
impl From<TriggerMode> for i32
Source§fn from(value: TriggerMode) -> i32
fn from(value: TriggerMode) -> i32
Source§impl Hash for TriggerMode
impl Hash for TriggerMode
Source§impl Ord for TriggerMode
impl Ord for TriggerMode
Source§fn cmp(&self, other: &TriggerMode) -> Ordering
fn cmp(&self, other: &TriggerMode) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for TriggerMode
impl PartialEq for TriggerMode
Source§impl PartialOrd for TriggerMode
impl PartialOrd for TriggerMode
impl Copy for TriggerMode
impl Eq for TriggerMode
impl StructuralPartialEq for TriggerMode
Auto Trait Implementations§
impl Freeze for TriggerMode
impl RefUnwindSafe for TriggerMode
impl Send for TriggerMode
impl Sync for TriggerMode
impl Unpin for TriggerMode
impl UnwindSafe for TriggerMode
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,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)