pub struct ComponentDataRegisterSynchronousProxy { /* private fields */ }
Implementations§
source§impl ComponentDataRegisterSynchronousProxy
impl ComponentDataRegisterSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
sourcepub fn wait_for_event(
&self,
deadline: MonotonicTime,
) -> Result<ComponentDataRegisterEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicTime, ) -> Result<ComponentDataRegisterEvent, Error>
Waits until an event arrives and returns it. It is safe for other threads to make concurrent requests while waiting for an event.
sourcepub fn upsert(
&self,
data: &ComponentData,
___deadline: MonotonicTime,
) -> Result<(), Error>
pub fn upsert( &self, data: &ComponentData, ___deadline: MonotonicTime, ) -> Result<(), Error>
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 SynchronousProxy for ComponentDataRegisterSynchronousProxy
impl SynchronousProxy for ComponentDataRegisterSynchronousProxy
§type Proxy = ComponentDataRegisterProxy
type Proxy = ComponentDataRegisterProxy
§type Protocol = ComponentDataRegisterMarker
type Protocol = ComponentDataRegisterMarker
Proxy
controls.