pub struct MouseSourceProxy { /* private fields */ }
Implementations§
Source§impl MouseSourceProxy
impl MouseSourceProxy
Sourcepub fn new(channel: AsyncChannel) -> Self
pub fn new(channel: AsyncChannel) -> Self
Create a new Proxy for fuchsia.ui.pointer/MouseSource.
Sourcepub fn take_event_stream(&self) -> MouseSourceEventStream
pub fn take_event_stream(&self) -> MouseSourceEventStream
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<Vec<MouseEvent>, DefaultFuchsiaResourceDialect>
pub fn watch( &self, ) -> QueryResponseFut<Vec<MouseEvent>, DefaultFuchsiaResourceDialect>
A method for a client to receive mouse pointer events.
This call is formulated as a “hanging get” pattern: the client asks for a set of recent events, 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.
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 events to the caller on a FIFO, lossless, best-effort basis, but the caller must allocate enough time to keep up with new events.
Event times. The timestamps on each event in the event vector are not guaranteed monotonic; events from different devices may be injected into Scenic at different times. Generally, events from a single device are expected to have monotonically increasing timestamps.
View parameters. Occasionally, changes in view or viewport require notifying the client. If a |MouseEvent| carries |ViewParameters|, these parameters apply to successive |MousePointerSample|s until the next |ViewParameters|.
Trait Implementations§
Source§impl Clone for MouseSourceProxy
impl Clone for MouseSourceProxy
Source§fn clone(&self) -> MouseSourceProxy
fn clone(&self) -> MouseSourceProxy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for MouseSourceProxy
impl Debug for MouseSourceProxy
Source§impl MouseSourceProxyInterface for MouseSourceProxy
impl MouseSourceProxyInterface for MouseSourceProxy
type WatchResponseFut = QueryResponseFut<Vec<MouseEvent>>
fn watch(&self) -> Self::WatchResponseFut
Source§impl Proxy for MouseSourceProxy
impl Proxy for MouseSourceProxy
Source§type Protocol = MouseSourceMarker
type Protocol = MouseSourceMarker
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 MouseSourceProxy
impl !RefUnwindSafe for MouseSourceProxy
impl Send for MouseSourceProxy
impl Sync for MouseSourceProxy
impl Unpin for MouseSourceProxy
impl !UnwindSafe for MouseSourceProxy
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
)