pub struct ComponentDataRegisterProxy { /* private fields */ }
Implementations§
Source§impl ComponentDataRegisterProxy
impl ComponentDataRegisterProxy
Sourcepub fn new(channel: AsyncChannel) -> Self
pub fn new(channel: AsyncChannel) -> Self
Create a new Proxy for fuchsia.feedback/ComponentDataRegister.
Sourcepub fn take_event_stream(&self) -> ComponentDataRegisterEventStream
pub fn take_event_stream(&self) -> ComponentDataRegisterEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn upsert(
&self,
data: &ComponentData,
) -> QueryResponseFut<(), DefaultFuchsiaResourceDialect>
pub fn upsert( &self, data: &ComponentData, ) -> QueryResponseFut<(), DefaultFuchsiaResourceDialect>
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.
Trait Implementations§
Source§impl Clone for ComponentDataRegisterProxy
impl Clone for ComponentDataRegisterProxy
Source§fn clone(&self) -> ComponentDataRegisterProxy
fn clone(&self) -> ComponentDataRegisterProxy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl ComponentDataRegisterProxyInterface for ComponentDataRegisterProxy
impl ComponentDataRegisterProxyInterface for ComponentDataRegisterProxy
type UpsertResponseFut = QueryResponseFut<()>
fn upsert(&self, data: &ComponentData) -> Self::UpsertResponseFut
Source§impl Debug for ComponentDataRegisterProxy
impl Debug for ComponentDataRegisterProxy
Source§impl Proxy for ComponentDataRegisterProxy
impl Proxy for ComponentDataRegisterProxy
Source§type Protocol = ComponentDataRegisterMarker
type Protocol = ComponentDataRegisterMarker
Proxy
controls.