pub struct ViewTreeWatcherProxy { /* private fields */ }
Implementations§
Source§impl ViewTreeWatcherProxy
impl ViewTreeWatcherProxy
Sourcepub fn new(channel: AsyncChannel) -> Self
pub fn new(channel: AsyncChannel) -> Self
Create a new Proxy for fuchsia.ui.observation.geometry/ViewTreeWatcher.
Sourcepub fn take_event_stream(&self) -> ViewTreeWatcherEventStream
pub fn take_event_stream(&self) -> ViewTreeWatcherEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn watch(
&self,
) -> QueryResponseFut<WatchResponse, DefaultFuchsiaResourceDialect>
pub fn watch( &self, ) -> QueryResponseFut<WatchResponse, DefaultFuchsiaResourceDialect>
A method of obtaining view tree snapshots for a particular view.
This call is formulated as a “hanging get” pattern: the client asks for a set of recent snapshots, and receives them via the callback. This pull-based approach ensures that clients consume events at their own pace; events don’t clog up the channel in an unbounded manner.
Error Handling. If Error is unset, the client may assume that the the response contains updates with complete information over its epoch.
Flow control. The caller is allowed at most one in-flight |Watch| call at a time; it is a logical error to have concurrent calls to |Watch|. Non-compliance results in channel closure.
Client pacing. The server will dispatch snapshots to the caller on a lossless, best-effort basis, but the caller must allocate enough time to keep up with new snapshots.
Trait Implementations§
Source§impl Clone for ViewTreeWatcherProxy
impl Clone for ViewTreeWatcherProxy
Source§fn clone(&self) -> ViewTreeWatcherProxy
fn clone(&self) -> ViewTreeWatcherProxy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for ViewTreeWatcherProxy
impl Debug for ViewTreeWatcherProxy
Source§impl Proxy for ViewTreeWatcherProxy
impl Proxy for ViewTreeWatcherProxy
Source§type Protocol = ViewTreeWatcherMarker
type Protocol = ViewTreeWatcherMarker
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>
Source§impl ViewTreeWatcherProxyInterface for ViewTreeWatcherProxy
impl ViewTreeWatcherProxyInterface for ViewTreeWatcherProxy
type WatchResponseFut = QueryResponseFut<WatchResponse>
fn watch(&self) -> Self::WatchResponseFut
Auto Trait Implementations§
impl Freeze for ViewTreeWatcherProxy
impl !RefUnwindSafe for ViewTreeWatcherProxy
impl Send for ViewTreeWatcherProxy
impl Sync for ViewTreeWatcherProxy
impl Unpin for ViewTreeWatcherProxy
impl !UnwindSafe for ViewTreeWatcherProxy
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
)