pub enum ComponentDataRegisterRequest {
Upsert {
data: ComponentData,
responder: ComponentDataRegisterUpsertResponder,
},
}
Expand description
Registers data useful to attach in feedback reports (crash, user feedback or bug reports).
This can be used by components to augment the data attached to all feedback reports. By default the Feedback service attaches data exposed to the platform. This protocol is useful for data known by certain components in certain products, but that is not exposed to the platform.
The epitaph ZX_ERR_INVALID_ARGS indicates that the client is sending invalid requests. See below for each request why they might be invalid.
The epitaph ZX_ERR_NO_RESOURCES indicates that the server can no longer store additional component data and will not service new connections.
Variants§
Upsert
Upserts, i.e. updates or inserts, extra component data to be included in feedback reports.
The namespace and each annotation key are used to decide whether to update or insert an annotation. If an annotation is already present for a given key within the same namespace, update the value, otherwise insert the annotation with that key under that namespace.
For instance, assuming these are the data already held by the server (from previous calls to Upsert()):
{
"bar": { # namespace
"channel": "stable",
},
"foo": { # namespace
"version": "0.2",
}
}
then:
Upsert({
"namespace": "bar",
"annotations": [
"version": "1.2.3.45",
"channel": "beta",
]
})
would result in the server now holding:
{
"bar": { # namespace
"channel": "beta", # updated
"version": "1.2.3.45" # inserted
},
"foo": { # namespace
"version": "0.2", # untouched
}
}
Note that the server will only hold at most MAX_NUM_ANNOTATIONS_PER_NAMESPACE distinct annotation keys per namespace, picking up the latest values.
Implementations§
Source§impl ComponentDataRegisterRequest
impl ComponentDataRegisterRequest
pub fn into_upsert( self, ) -> Option<(ComponentData, ComponentDataRegisterUpsertResponder)>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL