#[non_exhaustive]pub enum BackendEvent<'a> {
Winit(&'a WindowEvent),
}Expand description
One OS packet on its way into PointerBackend::translate.
This crate already re-exports winit types across its whole event-translation
surface (translate_mouse_button, translate_ime, translate_key all take
them), so borrowing a winit::event::WindowEvent here leaks nothing new. It
is an enum rather than a bare reference so that a backend for a different
window system — or a replay harness reading a recorded trace — can be added
as a variant without breaking the trait.
#[non_exhaustive]: adding a variant must not be a breaking change.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Winit(&'a WindowEvent)
A winit window event, borrowed from the event loop.
Trait Implementations§
Source§impl<'a> Debug for BackendEvent<'a>
impl<'a> Debug for BackendEvent<'a>
Source§impl<'a> From<&'a WindowEvent> for BackendEvent<'a>
impl<'a> From<&'a WindowEvent> for BackendEvent<'a>
Source§fn from(event: &'a WindowEvent) -> Self
fn from(event: &'a WindowEvent) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'a> Freeze for BackendEvent<'a>
impl<'a> RefUnwindSafe for BackendEvent<'a>
impl<'a> Send for BackendEvent<'a>
impl<'a> Sync for BackendEvent<'a>
impl<'a> Unpin for BackendEvent<'a>
impl<'a> UnsafeUnpin for BackendEvent<'a>
impl<'a> UnwindSafe for BackendEvent<'a>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.