pub struct AnnotationControllerProxy { /* private fields */ }
Implementations§
Source§impl AnnotationControllerProxy
impl AnnotationControllerProxy
Sourcepub fn new(channel: AsyncChannel) -> Self
pub fn new(channel: AsyncChannel) -> Self
Create a new Proxy for fuchsia.element/AnnotationController.
Sourcepub fn take_event_stream(&self) -> AnnotationControllerEventStream
pub fn take_event_stream(&self) -> AnnotationControllerEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn update_annotations(
&self,
annotations_to_set: Vec<Annotation>,
annotations_to_delete: &[AnnotationKey],
) -> QueryResponseFut<AnnotationControllerUpdateAnnotationsResult, DefaultFuchsiaResourceDialect>
pub fn update_annotations( &self, annotations_to_set: Vec<Annotation>, annotations_to_delete: &[AnnotationKey], ) -> QueryResponseFut<AnnotationControllerUpdateAnnotationsResult, DefaultFuchsiaResourceDialect>
Adds, updates, and removes annotations.
The server is expected to adhere to the following conventions:
- If a key in
annotations_to_set
is new, a new annotation is added - If a key in
annotations_to_set
already exists, the annotation value is updated - If a key in
annotations_to_delete
does not exist, it is ignored
The same key cannot appear twice in a call to UpdateAnnotations(). In other words, to set two Annotations with matching keys is illegal, as is an attempt to set an Annotation and also delete it.
If the operation results in an error, the annotations remain unchanged, and will not be partially updated.
- error
UpdateAnnotationsError.INVALID_ARGS
if the same key exists in bothannotations_to_set
andannotations_to_delete
. - error
UpdateAnnotationsError.INVALID_ARGS
if a key inannotations_to_set
orannotations_to_delete
has an empty namespace. - error
UpdateAnnotationsError.INVALID_ARGS
if anAnnotationValue.buffer
inannotations_to_set
could not be read. - error
UpdateAnnotationsError.TOO_MANY_ANNOTATIONS
if the operation results in more thanMAX_ANNOTATIONS_PER_ELEMENT
annotations existing.
Sourcepub fn get_annotations(
&self,
) -> QueryResponseFut<AnnotationControllerGetAnnotationsResult, DefaultFuchsiaResourceDialect>
pub fn get_annotations( &self, ) -> QueryResponseFut<AnnotationControllerGetAnnotationsResult, DefaultFuchsiaResourceDialect>
Returns the current Annotations
for the element.
- error
GetAnnotationsError
if the annotations could not be returned.
Sourcepub fn watch_annotations(
&self,
) -> QueryResponseFut<AnnotationControllerWatchAnnotationsResult, DefaultFuchsiaResourceDialect>
pub fn watch_annotations( &self, ) -> QueryResponseFut<AnnotationControllerWatchAnnotationsResult, DefaultFuchsiaResourceDialect>
Returns the full set of Annotations
when one or more of them have changed, or
when this method is called by the client for the first time.
This operation does not block other requests from the client, but only one
WatchAnnotations
request at a time can be made on a connection. If the
client makes a second WatchAnnotations
request before waiting for the
previous request to complete, the connection will be closed.
- error
WatchAnnotationsError
if the annotations could not be returned.
Trait Implementations§
Source§impl AnnotationControllerProxyInterface for AnnotationControllerProxy
impl AnnotationControllerProxyInterface for AnnotationControllerProxy
type UpdateAnnotationsResponseFut = QueryResponseFut<Result<(), UpdateAnnotationsError>>
type GetAnnotationsResponseFut = QueryResponseFut<Result<Vec<Annotation>, GetAnnotationsError>>
type WatchAnnotationsResponseFut = QueryResponseFut<Result<Vec<Annotation>, WatchAnnotationsError>>
fn update_annotations( &self, annotations_to_set: Vec<Annotation>, annotations_to_delete: &[AnnotationKey], ) -> Self::UpdateAnnotationsResponseFut
fn get_annotations(&self) -> Self::GetAnnotationsResponseFut
fn watch_annotations(&self) -> Self::WatchAnnotationsResponseFut
Source§impl Clone for AnnotationControllerProxy
impl Clone for AnnotationControllerProxy
Source§fn clone(&self) -> AnnotationControllerProxy
fn clone(&self) -> AnnotationControllerProxy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for AnnotationControllerProxy
impl Debug for AnnotationControllerProxy
Source§impl Proxy for AnnotationControllerProxy
impl Proxy for AnnotationControllerProxy
Source§type Protocol = AnnotationControllerMarker
type Protocol = AnnotationControllerMarker
Proxy
controls.Source§fn from_channel(inner: AsyncChannel) -> Self
fn from_channel(inner: AsyncChannel) -> Self
Source§fn into_channel(self) -> Result<AsyncChannel, Self>
fn into_channel(self) -> Result<AsyncChannel, Self>
Source§fn as_channel(&self) -> &AsyncChannel
fn as_channel(&self) -> &AsyncChannel
§fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
Auto Trait Implementations§
impl Freeze for AnnotationControllerProxy
impl !RefUnwindSafe for AnnotationControllerProxy
impl Send for AnnotationControllerProxy
impl Sync for AnnotationControllerProxy
impl Unpin for AnnotationControllerProxy
impl !UnwindSafe for AnnotationControllerProxy
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
)