pub enum ProviderV2Request {
Initialize {
config: ProviderConfigV2,
control_handle: ProviderV2ControlHandle,
},
Start {
options: StartOptions,
responder: ProviderV2StartResponder,
},
Stop {
responder: ProviderV2StopResponder,
},
Terminate {
responder: ProviderV2TerminateResponder,
},
GetKnownCategories {
responder: ProviderV2GetKnownCategoriesResponder,
},
NotifyBufferSaved {
wrapped_count: u32,
durable_data_end: u64,
control_handle: ProviderV2ControlHandle,
},
Flush {
control_handle: ProviderV2ControlHandle,
},
#[non_exhaustive] _UnknownMethod {
ordinal: u64,
control_handle: ProviderV2ControlHandle,
method_type: MethodType,
},
}Expand description
The provider interface which applications must implement and register
with the TraceRegistry to participate in tracing.
Variants§
Initialize
Initialize tracing and prepare for writing trace records for events in
the specified categories into buffer.
Tracing hasn’t started yet, a Start() call is still required.
At most one trace can be active at a time. Subsequent Initialize()
requests received prior to a Terminate() call must be ignored.
Start
Begin tracing.
If tracing has already started the provider must ignore the request.
Stop
Stop tracing.
If tracing has already stopped the provider must ignore the request.
Once the provider has finished writing any final events to the trace
buffer, it must send an OnStopped() event.
Note that multiple Start,Stop requests can be received between
Initialize,Terminate.
Fields
responder: ProviderV2StopResponderTerminate
Terminate tracing.
Tracing is stopped first if not already stopped.
Fields
responder: ProviderV2TerminateResponderGetKnownCategories
Gets the trace categories that might be produced by this provider.
Fields
responder: ProviderV2GetKnownCategoriesResponderNotifyBufferSaved
A buffer has been saved (streaming mode only).
Flush
Requests the provider its buffer to be read out, regardless of it is full or not.
Normally streaming mode only sends data once it has enough data to require a buffer swap and data flush. This produces fewer, but larger and bursty data transfers.
Some clients may want more regular smaller data transfers. These clients may instead manually invoke Flush whenever they are ready for data.
Fields
control_handle: ProviderV2ControlHandle#[non_exhaustive]_UnknownMethod
An interaction was received which does not match any known method.
Fields
This variant is marked as non-exhaustive
control_handle: ProviderV2ControlHandlemethod_type: MethodTypeImplementations§
Source§impl ProviderV2Request
impl ProviderV2Request
pub fn into_initialize( self, ) -> Option<(ProviderConfigV2, ProviderV2ControlHandle)>
pub fn into_start(self) -> Option<(StartOptions, ProviderV2StartResponder)>
pub fn into_stop(self) -> Option<ProviderV2StopResponder>
pub fn into_terminate(self) -> Option<ProviderV2TerminateResponder>
pub fn into_get_known_categories( self, ) -> Option<ProviderV2GetKnownCategoriesResponder>
pub fn into_notify_buffer_saved( self, ) -> Option<(u32, u64, ProviderV2ControlHandle)>
pub fn into_flush(self) -> Option<ProviderV2ControlHandle>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL