pub struct Mouse { /* private fields */ }
Expand description
Vmbus synthetic mouse device.
Implementations§
Source§impl Mouse
impl Mouse
Sourcepub fn new(source: Box<dyn InputSource<MouseData>>) -> Self
pub fn new(source: Box<dyn InputSource<MouseData>>) -> Self
Creates a new mouse device.
Sourcepub fn into_source(self) -> Box<dyn InputSource<MouseData>>
pub fn into_source(self) -> Box<dyn InputSource<MouseData>>
Extracts the mouse input receiver.
Trait Implementations§
Source§impl SaveRestoreSimpleVmbusDevice for Mouse
impl SaveRestoreSimpleVmbusDevice for Mouse
Source§fn save_open(&mut self, runner: &Self::Runner) -> Self::SavedState
fn save_open(&mut self, runner: &Self::Runner) -> Self::SavedState
Saves the channel. Read more
Source§fn restore_open(
&mut self,
state: Self::SavedState,
channel: RawAsyncChannel<GpadlRingMem>,
) -> Result<Self::Runner, ChannelOpenError>
fn restore_open( &mut self, state: Self::SavedState, channel: RawAsyncChannel<GpadlRingMem>, ) -> Result<Self::Runner, ChannelOpenError>
Restores the channel. Read more
Source§impl SimpleVmbusDevice for Mouse
impl SimpleVmbusDevice for Mouse
Source§type Runner = MouseChannel
type Runner = MouseChannel
The type used to run an open channel.
Source§type SavedState = SavedState
type SavedState = SavedState
The saved state type.
Source§fn offer(&self) -> OfferParams
fn offer(&self) -> OfferParams
The channel offer parameters.
Source§fn inspect(&mut self, req: Request<'_>, channel: Option<&mut MouseChannel>)
fn inspect(&mut self, req: Request<'_>, channel: Option<&mut MouseChannel>)
Inspects a channel.
Source§fn open(
&mut self,
channel: RawAsyncChannel<GpadlRingMem>,
_guest_memory: GuestMemory,
) -> Result<Self::Runner, ChannelOpenError>
fn open( &mut self, channel: RawAsyncChannel<GpadlRingMem>, _guest_memory: GuestMemory, ) -> Result<Self::Runner, ChannelOpenError>
Opens the channel, returning the runner to use to run the channel. Read more
Source§fn run<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 mut self,
stop: &'life1 mut StopTask<'life2>,
channel: &'life3 mut MouseChannel,
) -> Pin<Box<dyn Future<Output = Result<(), Cancelled>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn run<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 mut self,
stop: &'life1 mut StopTask<'life2>,
channel: &'life3 mut MouseChannel,
) -> Pin<Box<dyn Future<Output = Result<(), Cancelled>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Runs an open channel until
stop
is signaled.Source§fn close<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn close<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Closes the channel after the runner has been dropped.
Source§fn supports_save_restore(
&mut self,
) -> Option<&mut dyn SaveRestoreSimpleVmbusDevice<SavedState = Self::SavedState, Runner = Self::Runner>>
fn supports_save_restore( &mut self, ) -> Option<&mut dyn SaveRestoreSimpleVmbusDevice<SavedState = Self::SavedState, Runner = Self::Runner>>
Returns a trait used to save/restore the device. Read more
Auto Trait Implementations§
impl Freeze for Mouse
impl !RefUnwindSafe for Mouse
impl Send for Mouse
impl !Sync for Mouse
impl Unpin for Mouse
impl !UnwindSafe for Mouse
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
Mutably borrows from an owned value. Read more