pub struct Keyboard { /* private fields */ }
Expand description
A vmbus synthetic keyboard.
Implementations§
Source§impl Keyboard
impl Keyboard
Sourcepub fn new(source: Box<dyn InputSource<KeyboardData>>) -> Self
pub fn new(source: Box<dyn InputSource<KeyboardData>>) -> Self
Creates a new keyboard.
Sourcepub fn into_source(self) -> Box<dyn InputSource<KeyboardData>>
pub fn into_source(self) -> Box<dyn InputSource<KeyboardData>>
Extracts the keyboard input source.
Trait Implementations§
Source§impl SaveRestoreSimpleVmbusDevice for Keyboard
impl SaveRestoreSimpleVmbusDevice for Keyboard
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 Keyboard
impl SimpleVmbusDevice for Keyboard
Source§type Runner = KeyboardChannel
type Runner = KeyboardChannel
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 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 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 inspect(&mut self, req: Request<'_>, channel: Option<&mut Self::Runner>)
fn inspect(&mut self, req: Request<'_>, channel: Option<&mut Self::Runner>)
Inspects a channel.
Source§fn run<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 mut self,
stop: &'life1 mut StopTask<'life2>,
channel: &'life3 mut KeyboardChannel,
) -> 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 KeyboardChannel,
) -> 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 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 Keyboard
impl !RefUnwindSafe for Keyboard
impl Send for Keyboard
impl !Sync for Keyboard
impl Unpin for Keyboard
impl !UnwindSafe for Keyboard
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