pub struct WebEventSource { /* private fields */ }Expand description
Host-driven event source for WASM.
The host is responsible for pushing Event values and updating size.
Implementations§
Source§impl WebEventSource
impl WebEventSource
Sourcepub const fn features(&self) -> BackendFeatures
pub const fn features(&self) -> BackendFeatures
Read back the currently requested backend features.
Sourcepub fn push_event(&mut self, event: Event)
pub fn push_event(&mut self, event: Event)
Push a canonical event into the queue.
Sourcepub fn drain_events(&mut self) -> impl Iterator<Item = Event> + '_
pub fn drain_events(&mut self) -> impl Iterator<Item = Event> + '_
Drain all pending events.
Trait Implementations§
Source§impl BackendEventSource for WebEventSource
impl BackendEventSource for WebEventSource
Source§type Error = WebBackendError
type Error = WebBackendError
Platform-specific error type.
Source§fn size(&self) -> Result<(u16, u16), Self::Error>
fn size(&self) -> Result<(u16, u16), Self::Error>
Query current terminal dimensions (columns, rows).
Source§fn set_features(&mut self, features: BackendFeatures) -> Result<(), Self::Error>
fn set_features(&mut self, features: BackendFeatures) -> Result<(), Self::Error>
Enable or disable terminal features (mouse, paste, focus, kitty keyboard). Read more
Source§impl Clone for WebEventSource
impl Clone for WebEventSource
Source§fn clone(&self) -> WebEventSource
fn clone(&self) -> WebEventSource
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for WebEventSource
impl RefUnwindSafe for WebEventSource
impl Send for WebEventSource
impl Sync for WebEventSource
impl Unpin for WebEventSource
impl UnwindSafe for WebEventSource
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